git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] gitweb: blame: All rows have title; print 8 SP when no leading commit-8

From
LTLuben Tuikov <ltuikov@yahoo.com>
Date
Oct 5, 2006, 01:02 UTC
Message-ID
<20061005010215.63402.qmail@web31811.mail.mud.yahoo.com>

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(-)
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
Next: Junio C Hamano
Message 1 of 3 in “gitweb: blame: All rows have title; print 8 SP when no leading commit-8”
  1. 2/2 gitweb: blame: All rows have title; print 8 SP when no leading commit-8Luben Tuikov, Oct 5, 2006
  2. Junio C HamanoOct 5, 2006
  3. Luben TuikovOct 5, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.