Skip to content

Commit

Permalink
Merge branch 'ho/gitweb-squelch-undef-warning'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Junio C Hamano committed Jan 20, 2016
2 parents 7a63c9e + a9eb90a commit 569ff48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit 569ff48

Please sign in to comment.