aboutsummaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorPhilippe Bruhat (BooK) <book@cpan.org>2010-06-18 01:47:31 +0200
committerJunio C Hamano <gitster@pobox.com>2010-06-18 08:49:03 -0700
commit64abcc48447a976884e74a1efd866a21e06ddeec (patch)
treeca339316862ea76983e3be0798ef80b77bcd1143 /perl
parent74e42ce122bfcbd2e1a06395b80d6a4b44580148 (diff)
downloadgit-64abcc48447a976884e74a1efd866a21e06ddeec.tar.gz
git-64abcc48447a976884e74a1efd866a21e06ddeec.tar.xz
Git.pm: better error message
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>
Diffstat (limited to 'perl')
-rw-r--r--perl/Git.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl/Git.pm b/perl/Git.pm
index 1926dc9a4..6cb0dd193 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -172,7 +172,7 @@ sub repository {
}
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;
@@ -545,7 +545,7 @@ sub wc_chdir {
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.