diff options
author | Eric Wong <normalperson@yhbt.net> | 2006-12-08 01:55:19 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-08 02:07:01 -0800 |
commit | 006ede5e860717ff1ec68125393bcd4e74507e5b (patch) | |
tree | c5dd45e0d9e5b0aef646d12d246d599b36bafd5b /git-svn.perl | |
parent | db9819a40a56b4747931e637c1c22a104dcab902 (diff) | |
download | git-006ede5e860717ff1ec68125393bcd4e74507e5b.tar.gz |
git-svn: extra error check to ensure we open a file correctly
This may be an issue with repositories imported with commit
27a1a8014b842c0d70fdc91c68dd361ca2dfb34c or later, but before
commit dad73c0bb9f33323ec1aacf560a6263f1d85f81a.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-x | git-svn.perl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/git-svn.perl b/git-svn.perl index 747daf0181..ff61b9201f 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -3438,6 +3438,9 @@ sub open_file { my ($self, $path, $pb, $rev) = @_; my ($mode, $blob) = (safe_qx('git-ls-tree',$self->{c},'--',$path) =~ /^(\d{6}) blob ([a-f\d]{40})\t/); + unless (defined $mode && defined $blob) { + die "$path was not found in commit $self->{c} (r$rev)\n"; + } { path => $path, mode_a => $mode, mode_b => $mode, blob => $blob, pool => SVN::Pool->new, action => 'M' }; } |