summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d99bf51)
raw | patch | inline | side by side (parent: d99bf51)
author | Philippe Bruhat (BooK) <book@cpan.org> | |
Mon, 29 Dec 2008 00:25:00 +0000 (01:25 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 1 Jan 2009 14:34:58 +0000 (06:34 -0800) |
The repository constructor mistakenly rewrote a Directory parameter that
Perl happens to evaluate to false (e.g. "0") to ".".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Perl happens to evaluate to false (e.g. "0") to ".".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
perl/Git.pm | patch | blob | history |
diff --git a/perl/Git.pm b/perl/Git.pm
index 8392a68333cd57b899962ef6a7a9ca80dd5d583d..ad0f5304450cb7acf86465027f5fd7046e2458b3 100644 (file)
--- a/perl/Git.pm
+++ b/perl/Git.pm
}
}
- 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});