summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9074484)
raw | patch | inline | side by side (parent: 9074484)
author | Luben Tuikov <ltuikov@yahoo.com> | |
Wed, 4 Oct 2006 07:12:17 +0000 (00:12 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 4 Oct 2006 21:56:13 +0000 (14:56 -0700) |
Print commit-8 only on the first, leading row of
a commit block, to complement the per-commit block coloring.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
a commit block, to complement the per-commit block coloring.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 32bd7b6f9ccf81c90f1f73962f7d55fd7b757235..dc21cd6471ab22865f6bbe05da4b32da4f4dc3f6 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
my $rev = substr($full_rev, 0, 8);
my $lineno = $2;
my $data = $3;
+ my $print_c8 = 0;
if (!defined $last_rev) {
$last_rev = $full_rev;
+ $print_c8 = 1;
} elsif ($last_rev ne $full_rev) {
$last_rev = $full_rev;
$current_color = ++$current_color % $num_colors;
+ $print_c8 = 1;
}
print "<tr class=\"$rev_color[$current_color]\">\n";
- print "<td class=\"sha1\">" .
- $cgi->a({-href => href(action=>"commit", hash=>$full_rev, file_name=>$file_name)},
- esc_html($rev)) . "</td>\n";
+ print "<td class=\"sha1\">";
+ if ($print_c8 == 1) {
+ print $cgi->a({-href => href(action=>"commit", hash=>$full_rev, file_name=>$file_name)},
+ esc_html($rev));
+ }
+ print "</td>\n";
print "<td class=\"linenr\"><a id=\"l$lineno\" href=\"#l$lineno\" class=\"linenr\">" .
esc_html($lineno) . "</a></td>\n";
print "<td class=\"pre\">" . esc_html($data) . "</td>\n";