Skip to content

Commit

Permalink
gitweb: blame: Mouse-over commit-8 shows author and date
Browse files Browse the repository at this point in the history
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Luben Tuikov authored and Junio C Hamano committed Oct 4, 2006
1 parent 9dc5f8c commit c8aeaaf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -2490,11 +2490,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) {
Expand All @@ -2506,7 +2504,11 @@ sub git_blame2 {
$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));
Expand Down

0 comments on commit c8aeaaf

Please sign in to comment.