gitweb: avoid warnings for commits without body

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>
This commit is contained in:
Joey Hess 2008-09-05 14:26:29 -04:00 committed by Junio C Hamano
parent c882c01ef9
commit 53c3967647

View File

@ -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