From 970a565f0614b0f604627e87c65285ae578e04b3 Mon Sep 17 00:00:00 2001 From: Jakub Narebski Date: Thu, 26 Oct 2006 18:12:00 +0200 Subject: [PATCH] gitweb: Slight visual improvements to commitdiff view Signed-off-by: Jakub Narebski --- gitweb/gitweb.css | 16 ++++++++++++++-- gitweb/gitweb.perl | 18 ++++++++++-------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css index 0eda98237e..83d900dd8b 100644 --- a/gitweb/gitweb.css +++ b/gitweb/gitweb.css @@ -100,7 +100,7 @@ span.age { font-style: italic; } -div.page_body span.signoff { +span.signoff { color: #888888; } @@ -114,7 +114,7 @@ div.log_link { width: 136px; } -div.list_head { +div.diff_tree_head { padding: 6px 8px 4px; border: solid #d9d8d1; border-width: 1px 0px 0px; @@ -128,6 +128,18 @@ div.author_date { font-style: italic; } +div.commitdiff_log { + padding: 8px; + border: solid #d9d8d1; + border-width: 0px 0px 1px 0px; +} + +div.patchset { + padding-top: 8px; + border: solid #d9d8d1; + border-width: 1px 0px 0px 0px; +} + a.list { text-decoration: none; color: #000000; diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index bb51867ca6..5f6a56218d 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -1840,11 +1840,11 @@ sub git_print_tree_entry { sub git_difftree_body { my ($difftree, $hash, $parent) = @_; - print "
\n"; if ($#{$difftree} > 10) { + print "
\n"; print(($#{$difftree} + 1) . " files changed:\n"); + print "
\n"; } - print "
\n"; print "\n"; my $alternate = 1; @@ -2049,9 +2049,9 @@ sub git_patchset_body { } $patch_idx++; - # for now, no extended header, hence we skip empty patches - # companion to next LINE if $in_header; - if ($diffinfo->{'from_id'} eq $diffinfo->{'to_id'}) { # no change + # for now we skip empty patches + if ($diffinfo->{'from_id'} eq $diffinfo->{'to_id'}) { + # no change, empty patch $in_header = 1; next LINE; } @@ -3482,13 +3482,15 @@ sub git_commitdiff { git_print_page_nav('commitdiff','', $hash,$co{'tree'},$hash, $formats_nav); git_print_header_div('commit', esc_html($co{'title'}) . $ref, $hash); git_print_authorship(\%co); - print "
\n"; + if (@{$co{'comment'}} > 1) { - print "
\n"; + print "
\n"; git_print_log($co{'comment'}, -final_empty_line=> 1, -remove_title => 1); - print "
\n"; # class="log" + print "
\n"; # class="commitdiff_log" } + print "
\n"; + } elsif ($format eq 'plain') { my $refs = git_get_references("tags"); my $tagname = git_get_rev_name_tags($hash); -- 2.11.4.GIT