X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=perl%2FGit.pm;h=7d7f2b1d367b505676032878615b2843eb64ed7b;hb=b32acd21d81ac792cf28d487b960a2f6bb0ef0e2;hp=e9f8c9c048f3e9b7c0e3e492078c1d30a2044d78;hpb=4f8b8992ef0c009822cdca18d32ddf3a124ee284;p=git.git diff --git a/perl/Git.pm b/perl/Git.pm index e9f8c9c04..7d7f2b1d3 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -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});