gitweb: Protect against possible warning in git_commitdiff
[gitweb.git] / gitweb / gitweb.perl
index 758759576cbbac596b15dd4940aca24ff6dbdd84..b2482febfc50446b17bd7ce1611407c548ee781d 100755 (executable)
@@ -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;