gitweb: Protect against possible warning in git_commitdiff
We may read an undef from <$fd> and unconditionally chomping it would result in a warning. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
69945602f9
commit
04408c3578
@ -3731,7 +3731,8 @@ sub git_commitdiff {
|
||||
$hash_parent, $hash, "--"
|
||||
or die_error(undef, "Open git-diff-tree failed");
|
||||
|
||||
while (chomp(my $line = <$fd>)) {
|
||||
while (my $line = <$fd>) {
|
||||
chomp $line;
|
||||
# empty line ends raw part of diff-tree output
|
||||
last unless $line;
|
||||
push @difftree, $line;
|
||||
|
Loading…
Reference in New Issue
Block a user