Browse Source

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>
maint
Joey Hess 16 years ago committed by Junio C Hamano
parent
commit
53c3967647
  1. 2
      gitweb/gitweb.perl

2
gitweb/gitweb.perl

@ -2092,7 +2092,7 @@ sub parse_commit_text { @@ -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

Loading…
Cancel
Save