Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Git.pm: better error message
author
Philippe Bruhat (BooK)
<book@cpan.org>
Thu, 17 Jun 2010 23:47:31 +0000
(
01:47
+0200)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 18 Jun 2010 15:49:03 +0000
(08:49 -0700)
Provide the bad directory name alongside with $!
Note: $! is set if there is "No such file or directory",
but isn't set if the file exists but is not a directory.
Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
perl/Git.pm
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
74e42ce
)
diff --git
a/perl/Git.pm
b/perl/Git.pm
index 1926dc9a4b929c025456227526a93424d4972948..6cb0dd19344ba1169b23b7e4949033f8a9088a00 100644
(file)
--- a/
perl/Git.pm
+++ b/
perl/Git.pm
@@
-172,7
+172,7
@@
sub repository {
}
if (defined $opts{Directory}) {
}
if (defined $opts{Directory}) {
- -d $opts{Directory} or throw Error::Simple("Directory not found: $!");
+ -d $opts{Directory} or throw Error::Simple("Directory not found: $
opts{Directory} $
!");
my $search = Git->repository(WorkingCopy => $opts{Directory});
my $dir;
my $search = Git->repository(WorkingCopy => $opts{Directory});
my $dir;
@@
-545,7
+545,7
@@
sub wc_chdir {
or throw Error::Simple("bare repository");
-d $self->wc_path().'/'.$subdir
or throw Error::Simple("bare repository");
-d $self->wc_path().'/'.$subdir
- or throw Error::Simple("subdir not found: $!");
+ or throw Error::Simple("subdir not found: $
subdir $
!");
# Of course we will not "hold" the subdirectory so anyone
# can delete it now and we will never know. But at least we tried.
# Of course we will not "hold" the subdirectory so anyone
# can delete it now and we will never know. But at least we tried.