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

[PATCH 2/3] gitweb: blame: Mouse-over commit-8 shows author and date

From
LTLuben Tuikov <ltuikov@yahoo.com>
Date
Oct 4, 2006, 07:13 UTC
Message-ID
<20061004071338.88148.qmail@web31812.mail.mud.yahoo.com>
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
---
 gitweb/gitweb.perl |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 9518086..cba0840 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2496,11 +2496,9 @@ sub git_blame2 {
 <tr><th>Commit</th><th>Line</th><th>Data</th></tr>
 HTML
 	while (<$fd>) {
-		/^([0-9a-fA-F]{40}).*?(\d+)\)\s{1}(\s*.*)/;
-		my $full_rev = $1;
+		my ($full_rev, $author, $date, $lineno, $data) =
+			/^([0-9a-f]{40}).*?\s\((.*?)\s+([-\d]+ [:\d]+ [-+\d]+)\s+(\d+)\)\s(.*)/;
 		my $rev = substr($full_rev, 0, 8);
-		my $lineno = $2;
-		my $data = $3;
 		my $print_c8 = 0;
 
 		if (!defined $last_rev) {
@@ -2512,7 +2510,11 @@ HTML
 			$print_c8 = 1;
 		}
 		print "<tr class=\"$rev_color[$current_color]\">\n";
-		print "<td class=\"sha1\">";
+		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));
-- 
1.4.2.1.ga68d6
Message 1 of 1 in “gitweb: blame: Mouse-over commit-8 shows author and date”
  1. 2/3 gitweb: blame: Mouse-over commit-8 shows author and dateLuben Tuikov, Oct 4, 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.