Skip to content

Commit 569ff48

Browse files
committed
Merge branch 'ho/gitweb-squelch-undef-warning'
Asking gitweb for a nonexistent commit left a warning in the server log. Somebody may want to follow this up with a new test, perhaps? IIRC, we do test that no Perl warnings are given to the server log, so this should have been caught if our test coverage were good. * ho/gitweb-squelch-undef-warning: gitweb: squelch "uninitialized value" warning
2 parents 7a63c9e + a9eb90a commit 569ff48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitweb/gitweb.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7576,7 +7576,7 @@ sub git_object {
75767576
git_cmd(), 'cat-file', '-t', $object_id) . ' 2> /dev/null'
75777577
or die_error(404, "Object does not exist");
75787578
$type = <$fd>;
7579-
chomp $type;
7579+
defined $type && chomp $type;
75807580
close $fd
75817581
or die_error(404, "Object does not exist");
75827582

0 commit comments

Comments
 (0)