Skip to content

Commit

Permalink
gitweb: avoid warnings for commits without body
Browse files Browse the repository at this point in the history
In the unusual case when there is no commit message, gitweb would
output an uninitialized value warning.

Signed-off-by: Joey Hess <joey@kitenet.net>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Joey Hess authored and Junio C Hamano committed Sep 19, 2008
1 parent c882c01 commit 53c3967
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 @@ -2092,7 +2092,7 @@ sub parse_commit_text {
last;
}
}
if ($co{'title'} eq "") {
if (! defined $co{'title'} || $co{'title'} eq "") {
$co{'title'} = $co{'title_short'} = '(no commit message)';
}
# remove added spaces
Expand Down

0 comments on commit 53c3967

Please sign in to comment.