{"thread":{"id":"5806","subject":"[PATCH 1/3] gitweb: blame: print commit-8 on the leading row of a commit-block","startedAt":"2006-10-04T07:12:17Z","lastAt":"2006-10-04T07:12:17Z","messageCount":1,"participants":["Luben Tuikov"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"28201","messageId":"20061004071217.36209.qmail@web31804.mail.mud.yahoo.com","threadId":"5806","inReplyTo":null,"subject":"[PATCH 1/3] gitweb: blame: print commit-8 on the leading row of a commit-block","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2006-10-04T07:12:17Z","receivedAt":"2006-10-04T07:12:17Z","isPatch":true,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"Print commit-8 only on the first, leading row of\na commit block, to complement the per-commit block coloring.\n\nSigned-off-by: Luben Tuikov <ltuikov@yahoo.com>\n---\n gitweb/gitweb.perl |   12 +++++++++---\n 1 files changed, 9 insertions(+), 3 deletions(-)\n\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex a9e95c9..9518086 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2501,17 +2501,23 @@ HTML\n \t\tmy $rev = substr($full_rev, 0, 8);\n \t\tmy $lineno = $2;\n \t\tmy $data = $3;\n+\t\tmy $print_c8 = 0;\n \n \t\tif (!defined $last_rev) {\n \t\t\t$last_rev = $full_rev;\n+\t\t\t$print_c8 = 1;\n \t\t} elsif ($last_rev ne $full_rev) {\n \t\t\t$last_rev = $full_rev;\n \t\t\t$current_color = ++$current_color % $num_colors;\n+\t\t\t$print_c8 = 1;\n \t\t}\n \t\tprint \"<tr class=\\\"$rev_color[$current_color]\\\">\\n\";\n-\t\tprint \"<td class=\\\"sha1\\\">\" .\n-\t\t\t$cgi->a({-href => href(action=>\"commit\", hash=>$full_rev, file_name=>$file_name)},\n-\t\t\t        esc_html($rev)) . \"</td>\\n\";\n+\t\tprint \"<td class=\\\"sha1\\\">\";\n+\t\tif ($print_c8 == 1) {\n+\t\t\tprint $cgi->a({-href => href(action=>\"commit\", hash=>$full_rev, file_name=>$file_name)},\n+\t\t\t\t      esc_html($rev));\n+\t\t}\n+\t\tprint \"</td>\\n\";\n \t\tprint \"<td class=\\\"linenr\\\"><a id=\\\"l$lineno\\\" href=\\\"#l$lineno\\\" class=\\\"linenr\\\">\" .\n \t\t      esc_html($lineno) . \"</a></td>\\n\";\n \t\tprint \"<td class=\\\"pre\\\">\" . esc_html($data) . \"</td>\\n\";\n-- \n1.4.2.1.ga68d6\n\n"}]}