@matheusbsbs / matheus-bagliano / commits / c8aeaaf7fc
Fork 0

gitweb: blame: Mouse-over commit-8 shows author and date

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

Luben Tuikov committed Oct 4, 2006 at 00:13 UTC c8aeaaf7fc7dd93a284218e6a2b6e96b90e3100c
1 file changed +7 -5
gitweb/gitweb.perl
+7 -5
@@ -2490,11 +2490,9 @@ sub git_blame2 {
2490 <tr><th>Commit</th><th>Line</th><th>Data</th></tr>
2491 HTML
2492 while (<$fd>) {
2493 - /^([0-9a-fA-F]{40}).*?(\d+)\)\s{1}(\s*.*)/;
2494 - my $full_rev = $1;
2493 + my ($full_rev, $author, $date, $lineno, $data) =
2494 + /^([0-9a-f]{40}).*?\s\((.*?)\s+([-\d]+ [:\d]+ [-+\d]+)\s+(\d+)\)\s(.*)/;
2495 my $rev = substr($full_rev, 0, 8);
2496 - my $lineno = $2;
2497 - my $data = $3;
2496 my $print_c8 = 0;
2497
2498 if (!defined $last_rev) {
@@ -2506,7 +2504,11 @@ HTML
2504 $print_c8 = 1;
2505 }
2506 print "<tr class=\"$rev_color[$current_color]\">\n";
2509 - print "<td class=\"sha1\">";
2507 + print "<td class=\"sha1\"";
2508 + if ($print_c8 == 1) {
2509 + print " title=\"$author, $date\"";
2510 + }
2511 + print ">";
2512 if ($print_c8 == 1) {
2513 print $cgi->a({-href => href(action=>"commit", hash=>$full_rev, file_name=>$file_name)},
2514 esc_html($rev));