@matheusbsbs / matheus-bagliano / commits / 53c3967647
Fork 0

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>

Joey Hess committed Sep 5, 2008 at 14:26 UTC 53c3967647f79f1563d028d442f81cabba451ca6
1 file changed +1 -1
gitweb/gitweb.perl
+1 -1
@@ -2092,7 +2092,7 @@ sub parse_commit_text {
2092 last;
2093 }
2094 }
2095 - if ($co{'title'} eq "") {
2095 + if (! defined $co{'title'} || $co{'title'} eq "") {
2096 $co{'title'} = $co{'title_short'} = '(no commit message)';
2097 }
2098 # remove added spaces