]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Print commit message without title in commitdiff only if there is any
authorJakub Narebski <redacted>
Tue, 24 Oct 2006 11:55:33 +0000 (13:55 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:11 +0000 (00:07 -0400)
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 404ee6d8ab9ebde38a2e367b732e7fe8b73adeb4c31867ed868ba5056da6f0e8..7fed6fb14d6e3d7fbe868565ff6e3bca24061adae89cf68c6071736839561da4 100755 (executable)
@@ -3449,9 +3449,11 @@ sub git_commitdiff {
                git_print_header_div('commit', esc_html($co{'title'}) . $ref, $hash);
                git_print_authorship(\%co);
                print "<div class=\"page_body\">\n";
-               print "<div class=\"log\">\n";
-               git_print_log($co{'comment'}, -final_empty_line=> 1, -remove_title => 1);
-               print "</div>\n"; # class="log"
+               if (@{$co{'comment'}} > 1) {
+                       print "<div class=\"log\">\n";
+                       git_print_log($co{'comment'}, -final_empty_line=> 1, -remove_title => 1);
+                       print "</div>\n"; # class="log"
+               }
 
        } elsif ($format eq 'plain') {
                my $refs = git_get_references("tags");
This page took 0.199387 seconds and 4 git commands to generate.