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>
This commit is contained in:
Petr Baudis 2006-06-25 03:54:28 +02:00 committed by Junio C Hamano
parent 24c4b71436
commit 71efe0ca3c

View File

@ -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');