summaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorPetr Baudis <pasky@suse.cz>2006-06-25 03:54:28 +0200
committerJunio C Hamano <junkio@cox.net>2006-07-02 17:14:42 -0700
commit71efe0ca3c9c8bc8e7863e583cd2a808769c3bab (patch)
treec2d7ba2f72200a537e458de89621a81170f83c56 /perl
parent24c4b7143639cc821b6d06f9e125429e65dad8cd (diff)
downloadgit-71efe0ca3c9c8bc8e7863e583cd2a808769c3bab.tar.gz
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')
-rw-r--r--perl/Git.pm3
1 files changed, 2 insertions, 1 deletions
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');