Git development
 help / color / mirror / Atom feed
* [PATCH 2/2] gitweb: blame: All rows have title; print 8 SP when no leading commit-8
@ 2006-10-05  1:02 Luben Tuikov
  2006-10-05  1:24 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Luben Tuikov @ 2006-10-05  1:02 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

Print eight spaces when no leading commit is being printed.
I.e. on all rows of a commit-block, but the first.  This fixes
alignment in the destination buffer when blame data lines
are cut and pasted.

Also, now all rows have title.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
---
 gitweb/gitweb.perl |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

[-- Attachment #2: 1908141687-p2.txt --]
[-- Type: text/plain, Size: 898 bytes --]

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 451bf5d..2949fa4 100644
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2510,15 +2510,12 @@ HTML
 			$print_c8 = 1;
 		}
 		print "<tr class=\"$rev_color[$current_color]\">";
-		print "<td class=\"sha1\"";
-		if ($print_c8 == 1) {
-			print " title=\"$author, $date\"";
-		}
-		print ">";
-		if ($print_c8 == 1) {
-			print $cgi->a({-href => href(action=>"commit", hash=>$full_rev, file_name=>$file_name)},
-				      esc_html($rev));
+		print "<td class=\"sha1\" title=\"$author, $date\">";
+		if ($print_c8 == 0) {
+			$rev = "        ";
 		}
+		print $cgi->a({-href => href(action=>"commit", hash=>$full_rev, file_name=>$file_name)},
+			      esc_html($rev));
 		print "</td>";
 		print "<td class=\"linenr\"><a id=\"l$lineno\" href=\"#l$lineno\" class=\"linenr\">" .
 		      esc_html($lineno) . "</a></td>";
-- 
1.4.2.3.g7d77


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-10-05  1:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-05  1:02 [PATCH 2/2] gitweb: blame: All rows have title; print 8 SP when no leading commit-8 Luben Tuikov
2006-10-05  1:24 ` Junio C Hamano
2006-10-05  1:29   ` Luben Tuikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox