From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] gitweb: Slight visual improvements to commitdiff view
Date: Thu, 26 Oct 2006 18:13:11 +0200 [thread overview]
Message-ID: <200610261813.12567.jnareb@gmail.com> (raw)
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
gitweb/gitweb.css | 14 +++++++++++++-
gitweb/gitweb.perl | 15 +++++++++------
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
index 0eda982..cb2c627 100644
--- a/gitweb/gitweb.css
+++ b/gitweb/gitweb.css
@@ -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 0d2ea72..a33cae1 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1844,11 +1844,11 @@ sub git_print_tree_entry {
sub git_difftree_body {
my ($difftree, $hash, $parent) = @_;
- print "<div class=\"list_head\">\n";
if ($#{$difftree} > 10) {
+ print "<div class=\"list_head\">\n";
print(($#{$difftree} + 1) . " files changed:\n");
+ print "</div>\n";
}
- print "</div>\n";
print "<table class=\"diff_tree\">\n";
my $alternate = 1;
@@ -2055,7 +2055,8 @@ sub git_patchset_body {
# 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
+ if ($diffinfo->{'from_id'} eq $diffinfo->{'to_id'}) {
+ # no change, empty patch
$in_header = 1;
next LINE;
}
@@ -3486,13 +3487,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 "<div class=\"page_body\">\n";
+
if (@{$co{'comment'}} > 1) {
- print "<div class=\"log\">\n";
+ print "<div class=\"commitdiff_log\">\n";
git_print_log($co{'comment'}, -final_empty_line=> 1, -remove_title
=> 1);
- print "</div>\n"; # class="log"
+ print "</div>\n"; # class="commitdiff_log"
}
+ print "<div class=\"page_body\">\n";
+
} elsif ($format eq 'plain') {
my $refs = git_get_references("tags");
my $tagname = git_get_rev_name_tags($hash);
--
1.4.3.3
next reply other threads:[~2006-10-26 16:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-26 16:13 Jakub Narebski [this message]
2006-10-26 16:43 ` [PATCH (amend)] gitweb: Slight visual improvements to commitdiff view Jakub Narebski
2006-10-26 23:34 ` Luben Tuikov
2006-10-26 23:50 ` Jakub Narebski
2006-10-27 0:39 ` Luben Tuikov
2006-10-27 1:42 ` Junio C Hamano
2006-10-27 1:47 ` Petr Baudis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200610261813.12567.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).