summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-01-20 11:43:36 -0800
committerJunio C Hamano <gitster@pobox.com>2016-01-20 11:43:36 -0800
commit569ff48deb0d36f9e80c4d03d78e8b507820dc57 (patch)
tree89865af8747b8b8fc8654dc4cc40b2852426a2f1
parent7a63c9e3da357a21115e9b5de7ed84b744f9d8b1 (diff)
parenta9eb90aab5922e08a26c439806c80faa80f7c26d (diff)
downloadgit-569ff48deb0d36f9e80c4d03d78e8b507820dc57.tar.gz
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
-rwxr-xr-xgitweb/gitweb.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 7a5b23acf2..05d7910b7c 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -7576,7 +7576,7 @@ sub git_object {
git_cmd(), 'cat-file', '-t', $object_id) . ' 2> /dev/null'
or die_error(404, "Object does not exist");
$type = <$fd>;
- chomp $type;
+ defined $type && chomp $type;
close $fd
or die_error(404, "Object does not exist");