threads / patch / 5881

patchgitweb: Fix zebra coloring flip introduced by eeef88cd2

Subject: [PATCH] gitweb: Fix zebra coloring flip introduced by eeef88cd2

## tl;dr

3 messages between Oct 11, 2006 and Oct 11, 2006. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Luben Tuikov· Oct 11, 2006, 02:09 UTC · lore

Commit eeef88cd2 introduced $group_size which inverted the meaning of $current_color.

Normally we start with white (same as background) color for the zebra coloring, and flip to dark shade only when another commit changed some lines of the file. (Thus if there are no changes, the file appears black on white.)

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
---
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to gitweb/gitweb.perl +1 −1
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 173f521..77063f0 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2583,7 +2583,7 @@ sub git_blame2 {
 	git_print_page_path($file_name, $ftype, $hash_base);
 	my @rev_color = (qw(light2 dark2));
 	my $num_colors = scalar(@rev_color);
-	my $current_color = 0;
+	my $current_color = 1;
 	my $last_rev;
 	print <<HTML;
 <div class="page_body">
-- 
1.4.3.rc2.gd2a59
Junio C Hamano· Oct 11, 2006, 04:45 UTC · re: Luben Tuikov · lore

Re: [PATCH] gitweb: Fix zebra coloring flip introduced by eeef88cd2

Luben Tuikov <ltuikov@yahoo.com> writes:
Show 7 quoted lines
> Commit eeef88cd2 introduced $group_size which
> inverted the meaning of $current_color.
>
> Normally we start with white (same as background) color
> for the zebra coloring, and flip to dark shade only when
> another commit changed some lines of the file.  (Thus
> if there are no changes, the file appears black on white.)

I do not have much preference either way, but it was done more or less deliberately to match what you did with 6dd36ac.

Luben Tuikov· Oct 11, 2006, 07:21 UTC · re: Junio C Hamano · lore

Re: [PATCH] gitweb: Fix zebra coloring flip introduced by eeef88cd2

--- Junio C Hamano <junkio@cox.net> wrote:
> I do not have much preference either way, but it was done more
> or less deliberately to match what you did with 6dd36ac.

Sorry, I didn't mean to introduce the apparent inconsisteny. The 6dd36ac touches alternate "active" shading, and blame only shows the contents, albeit with the commit-8 and block coloring.

    Luben

← back to recent threads