gitweb: Handle commits with empty commit messages more reasonably
authorPetr Baudis <pasky@suse.cz>
Fri, 6 Oct 2006 16:55:04 +0000 (18:55 +0200)
committerJunio C Hamano <junkio@cox.net>
Sat, 7 Oct 2006 09:16:33 +0000 (02:16 -0700)
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 <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl

index 3d677a9db5e4db4b2455b40ecc643739d098ef5c..c7a245ac2dade108e3ac97403c5c4c86790ac6fc 100755 (executable)
@@ -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/^    //;