mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
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
This commit is contained in:
commit
569ff48deb
1 changed files with 1 additions and 1 deletions
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in a new issue