summaryrefslogtreecommitdiff
path: root/gitweb/gitweb.perl
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2009-12-01 16:54:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-12-01 19:25:21 (GMT)
commit87e573f660dd0e871f3eb673d0b856488b6d8336 (patch)
tree263c7e25036c77a61d3845d7918d05cb4f3f66ef /gitweb/gitweb.perl
parente627e50a70677c057e984aea8bac4c27687e9614 (diff)
downloadgit-87e573f660dd0e871f3eb673d0b856488b6d8336.zip
git-87e573f660dd0e871f3eb673d0b856488b6d8336.tar.gz
git-87e573f660dd0e871f3eb673d0b856488b6d8336.tar.bz2
gitweb: Add link to other blame implementation in blame views
Add link to 'blame_incremental' action (which requires JavaScript) in 'blame' view, and add link to 'blame' action in 'blame_incremental' view. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/gitweb.perl')
-rwxr-xr-xgitweb/gitweb.perl11
1 files changed, 11 insertions, 0 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 3368f2a..49402dc 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -4883,6 +4883,17 @@ sub git_blame_common {
my $formats_nav =
$cgi->a({-href => href(action=>"blob", -replay=>1)},
"blob") .
+ " | ";
+ if ($format eq 'incremental') {
+ $formats_nav .=
+ $cgi->a({-href => href(action=>"blame", javascript=>0, -replay=>1)},
+ "blame") . " (non-incremental)";
+ } else {
+ $formats_nav .=
+ $cgi->a({-href => href(action=>"blame_incremental", -replay=>1)},
+ "blame") . " (incremental)";
+ }
+ $formats_nav .=
" | " .
$cgi->a({-href => href(action=>"history", -replay=>1)},
"history") .