From: Martin Koegler Date: Sun, 25 Mar 2007 20:34:19 GMT Subject: [PATCH] gitweb: link base commit (hpb) to blobdiff output Message-ID: <11748548623841-git-send-email-mkoegler@auto.tuwien.ac.at> In-Reply-To: <11748548621186-git-send-email-mkoegler@auto.tuwien.ac.at> blobdiff only has links for the "TO" commit. This patch adds the same links for the "FROM" commit. Signed-off-by: Martin Koegler --- gitweb/gitweb.perl | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index e3c2918..4c371b2 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -4014,6 +4014,21 @@ sub git_blobdiff { hash_base=>$hash_base, hash_parent_base=>$hash_parent_base, file_name=>$file_name, file_parent=>$file_parent)}, "raw"); + if (defined $hash_parent_base && (my %co = parse_commit($hash_parent_base))) { + $formats_nav .= " | from: ". + $cgi->a({-href => href(action=>"commit", + hash=>$hash_parent_base)}, + "commit") + ." | ". + $cgi->a({-href => href(action=>"commitdiff", + hash=>$hash_parent_base)}, + "commitdiff") + ." | ". + $cgi->a({-href => href(action=>"tree", + hash=>$co{'tree'}, + hash_base=>$hash_parent_base)}, + "tree"); + } git_header_html(undef, $expires); if (defined $hash_base && (my %co = parse_commit($hash_base))) { git_print_page_nav('','', $hash_base,$co{'tree'},$hash_base, $formats_nav); -- 1.5.1.rc1.51.gb08b-dirty