From: Joey Hess Date: Fri, 5 Sep 2008 18:26:29 +0000 (-0400) Subject: gitweb: avoid warnings for commits without body X-Git-Tag: v1.6.0.3~86 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=53c3967647f79f1563d028d442f81cabba451ca6;p=git.git 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 Acked-by: Jakub Narebski Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 90cd99bf9..269f1125d 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -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