]> Lady’s Gitweb - Gitweb/commitdiff
gitweb.cgi: git_blame2: Allow back-trekking through commits
authorLuben Tuikov <redacted>
Sun, 23 Jul 2006 20:36:32 +0000 (13:36 -0700)
committerLady <redacted>
Sat, 4 Apr 2026 18:43:37 +0000 (14:43 -0400)
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.cgi

index 12dbc9cc9bea2cf4368688dff38f09881d98f9f15fde32302b4759aef23945c0..8455d42b300a353400e08f8ad85994e1ec91727e60de2f2ef5d56f173ac4f2b5 100755 (executable)
@@ -2012,7 +2012,13 @@ sub git_commit {
                print " | " . $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commitdiff;h=$hash")}, "commitdiff");
        }
        print " | " . $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=tree;h=$co{'tree'};hb=$hash")}, "tree") . "\n" .
-             "<br/><br/></div>\n";
+               "<br/>\n";
+       if (defined $file_name && defined $co{'parent'}) {
+               my $parent = $co{'parent'};
+               print $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=blame;hb=$parent;f=$file_name")}, "blame") . "\n";
+       }
+       print "<br/></div>\n";
+
        if (defined $co{'parent'}) {
                print "<div>\n" .
                      $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commitdiff;h=$hash"), -class => "title"}, esc_html($co{'title'}) . $ref) . "\n" .
This page took 0.29947 seconds and 4 git commands to generate.