From 71efe0ca3c9c8bc8e7863e583cd2a808769c3bab Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sun, 25 Jun 2006 03:54:28 +0200 Subject: [PATCH] Git.pm: Fix Git->repository("/somewhere/totally/elsewhere") Signed-off-by: Petr Baudis Signed-off-by: Junio C Hamano --- perl/Git.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl/Git.pm b/perl/Git.pm index 5ec7ef8c24..0581447757 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -178,7 +178,8 @@ sub repository { }; if ($dir) { - $opts{Repository} = abs_path($dir); + $dir =~ m#^/# or $dir = $opts{Directory} . '/' . $dir; + $opts{Repository} = $dir; # If --git-dir went ok, this shouldn't die either. my $prefix = $search->command_oneline('rev-parse', '--show-prefix'); -- 2.11.4.GIT