Skip to content

Commit

Permalink
git-svn: extra error check to ensure we open a file correctly
Browse files Browse the repository at this point in the history
This may be an issue with repositories imported with commit
27a1a80 or later, but before
commit dad73c0.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Eric Wong authored and Junio C Hamano committed Dec 8, 2006
1 parent db9819a commit 006ede5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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' };
}
Expand Down

0 comments on commit 006ede5

Please sign in to comment.