]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: blame: Mouse-over commit-8 shows author and date
authorLuben Tuikov <redacted>
Wed, 4 Oct 2006 07:13:38 +0000 (00:13 -0700)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:10 +0000 (00:07 -0400)
Signed-off-by: Luben Tuikov <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 5688f76be3634029cf96379f8a3b50d2b6c51b402c0a5d3f484c98a617563d69..f7fc464c5a8aa8e715c9854a7bcc5142b9dedb8637e5098cbcb74eede0efccc1 100755 (executable)
@@ -2510,11 +2510,9 @@ sub git_blame2 {
 <tr><th>Commit</th><th>Line</th><th>Data</th></tr>
 HTML
        while (<$fd>) {
 <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 $rev = substr($full_rev, 0, 8);
-               my $lineno = $2;
-               my $data = $3;
                my $print_c8 = 0;
 
                if (!defined $last_rev) {
                my $print_c8 = 0;
 
                if (!defined $last_rev) {
@@ -2526,7 +2524,11 @@ HTML
                        $print_c8 = 1;
                }
                print "<tr class=\"$rev_color[$current_color]\">\n";
                        $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));
                if ($print_c8 == 1) {
                        print $cgi->a({-href => href(action=>"commit", hash=>$full_rev, file_name=>$file_name)},
                                      esc_html($rev));
This page took 0.28983 seconds and 4 git commands to generate.