From: Petr Baudis Date: Fri, 6 Oct 2006 16:55:04 +0000 (+0200) Subject: gitweb: Handle commits with empty commit messages more reasonably X-Git-Tag: v1.4.3-rc2~7 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/7e0fe5c939bdd5cc2885d21799e95304a46bf706?hp=689b7f5ccbbb71f5a1a165cfb1e24abd42c7d009 gitweb: Handle commits with empty commit messages more reasonably Currently those look very weird, you can't get easily at the commit view etc. This patch makes their title '(no commit message)'. Signed-off-by: Petr Baudis Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 3d677a9db5..c7a245ac2d 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -1071,6 +1071,9 @@ sub parse_commit { last; } } + if ($co{'title'} eq "") { + $co{'title'} = $co{'title_short'} = '(no commit message)'; + } # remove added spaces foreach my $line (@commit_lines) { $line =~ s/^ //;