From: Luben Tuikov Date: Sun, 23 Jul 2006 20:36:32 +0000 (-0700) Subject: gitweb.cgi: git_blame2: Allow back-trekking through commits X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/3c0d9cfab1bd092216f7a2f9273106ee27f42babc1d342aa8006086f778fa155 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 Signed-off-by: Junio C Hamano --- diff --git a/gitweb.cgi b/gitweb.cgi index 12dbc9c..8455d42 100755 --- a/gitweb.cgi +++ b/gitweb.cgi @@ -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" . - "

\n"; + "
\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 "
\n"; + if (defined $co{'parent'}) { print "
\n" . $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commitdiff;h=$hash"), -class => "title"}, esc_html($co{'title'}) . $ref) . "\n" .