diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 0ac05cc718..68347ac975 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -974,6 +974,9 @@ sub parse_date { $date{'hour_local'} = $hour; $date{'minute_local'} = $min; $date{'tz_local'} = $tz; + $date{'iso-tz'} = sprintf ("%04d-%02d-%02d %02d:%02d:%02d %s", + 1900+$year, $mon+1, $mday, + $hour, $min, $sec, $tz); return %date; } @@ -2501,7 +2504,8 @@ sub git_blame2 { if ($ftype !~ "blob") { die_error("400 Bad Request", "Object is not a blob"); } - open ($fd, "-|", git_cmd(), "blame", '-l', '--', $file_name, $hash_base) + open ($fd, "-|", git_cmd(), "blame", '--porcelain', '--', + $file_name, $hash_base) or die_error(undef, "Open git-blame failed"); git_header_html(); my $formats_nav = @@ -2525,33 +2529,52 @@ sub git_blame2 {
Commit | Line | Data | |
---|---|---|---|
"; - if ($print_c8 == 1) { - print $cgi->a({-href => href(action=>"commit", hash=>$full_rev, file_name=>$file_name)}, + print " rowspan=\"$group_size\"" if ($group_size > 1); + print ">"; + print $cgi->a({-href => href(action=>"commit", + hash=>$full_rev, + file_name=>$file_name)}, esc_html($rev)); + print " | \n"; } - print "\n"; - print "" . - esc_html($lineno) . " | \n"; + my $blamed = href(action => 'blame', + file_name => $meta->{'filename'}, + hash_base => $full_rev); + print ""; + print $cgi->a({ -href => "$blamed#l$orig_lineno", + -id => "l$lineno", + -class => "linenr" }, + esc_html($lineno)); + print " | "; print "" . esc_html($data) . " | \n"; print "