From: Luben Tuikov Date: Wed, 4 Oct 2006 07:12:17 +0000 (-0700) Subject: gitweb: blame: print commit-8 on the leading row of a commit-block X-Git-Tag: v1.4.4-rc1~69^2~7 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9dc5f8c9c2a10f77ecfa448c93da6ceec759df73;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 32bd7b6f9..dc21cd647 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 "\n"; - print "" . - $cgi->a({-href => href(action=>"commit", hash=>$full_rev, file_name=>$file_name)}, - esc_html($rev)) . "\n"; + print ""; + if ($print_c8 == 1) { + print $cgi->a({-href => href(action=>"commit", hash=>$full_rev, file_name=>$file_name)}, + esc_html($rev)); + } + print "\n"; print "" . esc_html($lineno) . "\n"; print "" . esc_html($data) . "\n";