diff options
author | Petr Baudis <pasky@suse.cz> | 2006-06-25 03:54:28 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-07-02 17:14:42 -0700 |
commit | 71efe0ca3c9c8bc8e7863e583cd2a808769c3bab (patch) | |
tree | c2d7ba2f72200a537e458de89621a81170f83c56 /perl/Git.pm | |
parent | 24c4b7143639cc821b6d06f9e125429e65dad8cd (diff) | |
download | git-71efe0ca3c9c8bc8e7863e583cd2a808769c3bab.tar.gz git-71efe0ca3c9c8bc8e7863e583cd2a808769c3bab.tar.xz |
Git.pm: Fix Git->repository("/somewhere/totally/elsewhere")
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'perl/Git.pm')
-rw-r--r-- | perl/Git.pm | 3 |
1 files changed, 2 insertions, 1 deletions
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'); |