aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2006-10-24 13:55:33 +0200
committerJunio C Hamano <junkio@cox.net>2006-10-24 21:36:42 -0700
commit82560983997c961d9deafe0074b787c8484c2e1d (patch)
tree663bcf92da18012af44a0f3d02784556966c8534 /gitweb
parent62fae51dd57b36cfbb25c9ade539ea5a6ef5ad84 (diff)
downloadgit-82560983997c961d9deafe0074b787c8484c2e1d.tar.gz
git-82560983997c961d9deafe0074b787c8484c2e1d.tar.xz
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>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl8
1 files changed, 5 insertions, 3 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 2bc14b2c2..c82fc6268 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -3428,9 +3428,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");