gitweb.cgi: git_blame2: Allow back-trekking through commits
This patch adds the capability of back-trekking through commits from git_blame2() as follows: blame2->commit->blame2->commit->blame2->...->initial commit. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Luben Tuikov committed
Jul 23, 2006 at 13:36 UTC
4f7b34c98f6f3853c6b82a85f3e49121c59180f7
1 file changed
+7
-1
gitweb/gitweb.cgi
+7
-1
@@ -2022,7 +2022,13 @@ sub git_commit {
2022
print " | " . $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commitdiff;h=$hash")}, "commitdiff");
2023
}
2024
print " | " . $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=tree;h=$co{'tree'};hb=$hash")}, "tree") . "\n" .
2025
- "<br/><br/></div>\n";
2025
+ "<br/>\n";
2026
+ if (defined $file_name && defined $co{'parent'}) {
2027
+ my $parent = $co{'parent'};
2028
+ print $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=blame;hb=$parent;f=$file_name")}, "blame") . "\n";
2029
+ }
2030
+ print "<br/></div>\n";
2031
+
2032
if (defined $co{'parent'}) {
2033
print "<div>\n" .
2034
$cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commitdiff;h=$hash"), -class => "title"}, esc_html($co{'title'}) . $ref) . "\n" .