1
0
mirror of https://github.com/git/git.git synced 2024-10-21 01:08:11 +02:00

Merge branch 'pb/maint-git-pm-false-dir'

* pb/maint-git-pm-false-dir:
  Git.pm: correctly handle directory name that evaluates to "false"
This commit is contained in:
Junio C Hamano 2009-01-13 23:09:42 -08:00
commit 4d8e6e1d79

@ -166,11 +166,12 @@ sub repository {
}
}
if (not defined $opts{Repository} and not defined $opts{WorkingCopy}) {
$opts{Directory} ||= '.';
if (not defined $opts{Repository} and not defined $opts{WorkingCopy}
and not defined $opts{Directory}) {
$opts{Directory} = '.';
}
if ($opts{Directory}) {
if (defined $opts{Directory}) {
-d $opts{Directory} or throw Error::Simple("Directory not found: $!");
my $search = Git->repository(WorkingCopy => $opts{Directory});