Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorLuben Tuikov <ltuikov@yahoo.com>2006-10-04 11:12:17 +0400
committerJunio C Hamano <junkio@cox.net>2006-10-05 01:56:13 +0400
commit9dc5f8c9c2a10f77ecfa448c93da6ceec759df73 (patch)
treedb9c62273c5100dfd84948c356e71da9371e448b /gitweb
parent9074484a2ba28cd41a78e0b10074a8882653bf3a (diff)
gitweb: blame: print commit-8 on the leading row of a commit-block
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>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl12
1 files changed, 9 insertions, 3 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 32bd7b6f9c..dc21cd6471 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2495,17 +2495,23 @@ HTML
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";