Browse Source

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>
maint
Petr Baudis 19 years ago committed by Junio C Hamano
parent
commit
71efe0ca3c
  1. 3
      perl/Git.pm

3
perl/Git.pm

@ -178,7 +178,8 @@ sub repository { @@ -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');

Loading…
Cancel
Save