Revert "gitweb: extend blame to show links to diff and previous"
This concept is very fine, but it makes blame slow across renames and across branches, so revert it. There is a better way to do this. This reverts commit 03d06a8e26f4fbd37800d1e1125c6ecf4c104466. Signed-off-by: Junio C Hamano <junkio@cox.net>
Luben Tuikov committed
Sep 27, 2006 at 17:22 UTC
709f898dae46b9b035e98cc634fa3ac2492b6cee
1 file changed
+1
-17
gitweb/gitweb.perl
+1
-17
@@ -2479,7 +2479,7 @@ sub git_blame2 {
2479
print <<HTML;
2480
<div class="page_body">
2481
<table class="blame">
2482
-<tr><th>Prev</th><th>Diff</th><th>Commit</th><th>Line</th><th>Data</th></tr>
2482
+<tr><th>Commit</th><th>Line</th><th>Data</th></tr>
2483
HTML
2484
while (<$fd>) {
2485
/^([0-9a-fA-F]{40}).*?(\d+)\)\s{1}(\s*.*)/;
@@ -2487,8 +2487,6 @@ HTML
2487
my $rev = substr($full_rev, 0, 8);
2488
my $lineno = $2;
2489
my $data = $3;
2490
- my %pco = parse_commit($full_rev);
2491
- my $parent = $pco{'parent'};
2490
2491
if (!defined $last_rev) {
2492
$last_rev = $full_rev;
@@ -2497,25 +2495,11 @@ HTML
2495
$current_color = ++$current_color % $num_colors;
2496
}
2497
print "<tr class=\"$rev_color[$current_color]\">\n";
2500
- # Print the Prev link
2501
- print "<td class=\"sha1\">";
2502
- print $cgi->a({-href => href(action=>"blame", hash_base=>$parent, file_name=>$file_name)},
2503
- esc_html(substr($parent, 0, 8)));
2504
- print "</td>\n";
2505
- # Print the Diff (blobdiff) link
2506
- print "<td>";
2507
- print $cgi->a({-href => href(action=>"blobdiff", file_name=>$file_name, hash_parent_base=>$parent,
2508
- hash_base=>$full_rev)},
2509
- esc_html("Diff"));
2510
- print "</td>\n";
2511
- # Print the Commit link
2498
print "<td class=\"sha1\">" .
2499
$cgi->a({-href => href(action=>"commit", hash=>$full_rev, file_name=>$file_name)},
2500
esc_html($rev)) . "</td>\n";
2515
- # Print the Line number
2501
print "<td class=\"linenr\"><a id=\"l$lineno\" href=\"#l$lineno\" class=\"linenr\">" .
2502
esc_html($lineno) . "</a></td>\n";
2518
- # Print the Data
2503
print "<td class=\"pre\">" . esc_html($data) . "</td>\n";
2504
print "</tr>\n";
2505
}