From 006ede5e860717ff1ec68125393bcd4e74507e5b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 8 Dec 2006 01:55:19 -0800 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- git-svn.perl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git-svn.perl b/git-svn.perl index 747daf018..ff61b9201 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' }; } -- 2.30.2