зеркало из https://github.com/microsoft/git.git
git-svn: extra error check to ensure we open a file correctly
This may be an issue with repositories imported with commit27a1a8014b
or later, but before commitdad73c0bb9
. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Родитель
db9819a40a
Коммит
006ede5e86
|
@ -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' };
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче