From: Junio C Hamano Date: Wed, 14 Jan 2009 07:12:51 +0000 (-0800) Subject: Merge branch 'maint' X-Git-Tag: v1.6.2-rc0~156 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e98c6a168635f3fedadc3963680eba69d2e42324?ds=inline;hp=-c Merge branch 'maint' * maint: fast-import: Cleanup mode setting. Git.pm: call Error::Simple() properly --- e98c6a168635f3fedadc3963680eba69d2e42324 diff --combined perl/Git.pm index ad0f530445,e9f8c9c048..7d7f2b1d36 --- a/perl/Git.pm +++ b/perl/Git.pm @@@ -166,12 -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}); @@@ -1011,8 -1010,8 +1011,8 @@@ sub _temp_cache my $temp_fd = \$TEMP_FILEMAP{$name}; if (defined $$temp_fd and $$temp_fd->opened) { if ($TEMP_FILES{$$temp_fd}{locked}) { - throw Error::Simple("Temp file with moniker '", - $name, "' already in use"); + throw Error::Simple("Temp file with moniker '" . + $name . "' already in use"); } } else { if (defined $$temp_fd) {