@matheusbsbs / matheus-bagliano / commits / 8256098399
Fork 0

gitweb: Print commit message without title in commitdiff only if there is any

Print the rest of commit message (title, i.e. first line of commit message, is printed separately) only if there is any. In repository which uses signoffs this shouldn't happen, because commit message should consist of at least title and signoff. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

Jakub Narebski committed Oct 24, 2006 at 13:55 UTC 82560983997c961d9deafe0074b787c8484c2e1d
1 file changed +5 -3
gitweb/gitweb.perl
+5 -3
@@ -3428,9 +3428,11 @@ sub git_commitdiff {
3428 git_print_header_div('commit', esc_html($co{'title'}) . $ref, $hash);
3429 git_print_authorship(\%co);
3430 print "<div class=\"page_body\">\n";
3431 - print "<div class=\"log\">\n";
3432 - git_print_log($co{'comment'}, -final_empty_line=> 1, -remove_title => 1);
3433 - print "</div>\n"; # class="log"
3431 + if (@{$co{'comment'}} > 1) {
3432 + print "<div class=\"log\">\n";
3433 + git_print_log($co{'comment'}, -final_empty_line=> 1, -remove_title => 1);
3434 + print "</div>\n"; # class="log"
3435 + }
3436
3437 } elsif ($format eq 'plain') {
3438 my $refs = git_get_references("tags");