projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6994560
)
gitweb: Protect against possible warning in git_commitdiff
author
Jakub Narebski
<jnareb@gmail.com>
Sat, 18 Nov 2006 22:35:38 +0000
(23:35 +0100)
committer
Junio C Hamano
<junkio@cox.net>
Tue, 21 Nov 2006 22:35:40 +0000
(14:35 -0800)
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>
gitweb/gitweb.perl
patch
|
blob
|
history
diff --git
a/gitweb/gitweb.perl
b/gitweb/gitweb.perl
index 758759576cbbac596b15dd4940aca24ff6dbdd84..b2482febfc50446b17bd7ce1611407c548ee781d 100755
(executable)
--- a/
gitweb/gitweb.perl
+++ b/
gitweb/gitweb.perl
@@
-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;