From: Petr Baudis Date: Sun, 25 Jun 2006 01:54:28 +0000 (+0200) Subject: Git.pm: Fix Git->repository("/somewhere/totally/elsewhere") X-Git-Tag: v1.4.3-rc1~2^2~35 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=71efe0ca3c9c8bc8e7863e583cd2a808769c3bab;p=git.git Git.pm: Fix Git->repository("/somewhere/totally/elsewhere") Signed-off-by: Petr Baudis Signed-off-by: Junio C Hamano --- diff --git a/perl/Git.pm b/perl/Git.pm index 5ec7ef8c2..058144775 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');