summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 744d0ac)
raw | patch | inline | side by side (parent: 744d0ac)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 8 Nov 2006 20:22:04 +0000 (12:22 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 8 Nov 2006 20:34:25 +0000 (12:34 -0800) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index f937ee1aec18151f8ca7e2f72bbe07942d4fdabd..634975b3c85ca421f7df866c5906eed22293af6a 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
sub git_difftree_body {
my ($difftree, $hash, $parent) = @_;
-
+ my ($have_blame) = gitweb_check_feature('blame');
print "<div class=\"list_head\">\n";
if ($#{$difftree} > 10) {
print(($#{$difftree} + 1) . " files changed:\n");
print $cgi->a({-href => href(action=>"blob", hash=>$diff{'from_id'},
hash_base=>$parent, file_name=>$diff{'file'})},
"blob") . " | ";
- print $cgi->a({-href => href(action=>"blame", hash_base=>$parent,
- file_name=>$diff{'file'})},
- "blame") . " | ";
+ if ($have_blame) {
+ print $cgi->a({-href =>
+ href(action=>"blame",
+ hash_base=>$parent,
+ file_name=>$diff{'file'})},
+ "blame") . " | ";
+ }
print $cgi->a({-href => href(action=>"history", hash_base=>$parent,
file_name=>$diff{'file'})},
"history");
print $cgi->a({-href => href(action=>"blob", hash=>$diff{'to_id'},
hash_base=>$hash, file_name=>$diff{'file'})},
"blob") . " | ";
- print $cgi->a({-href => href(action=>"blame", hash_base=>$hash,
- file_name=>$diff{'file'})},
- "blame") . " | ";
+ if ($have_blame) {
+ print $cgi->a({-href => href(action=>"blame",
+ hash_base=>$hash,
+ file_name=>$diff{'file'})},
+ "blame") . " | ";
+ }
print $cgi->a({-href => href(action=>"history", hash_base=>$hash,
file_name=>$diff{'file'})},
"history");
print $cgi->a({-href => href(action=>"blob", hash=>$diff{'from_id'},
hash_base=>$parent, file_name=>$diff{'from_file'})},
"blob") . " | ";
- print $cgi->a({-href => href(action=>"blame", hash_base=>$parent,
- file_name=>$diff{'from_file'})},
- "blame") . " | ";
+ if ($have_blame) {
+ print $cgi->a({-href => href(action=>"blame",
+ hash_base=>$hash,
+ file_name=>$diff{'to_file'})},
+ "blame") . " | ";
+ }
print $cgi->a({-href => href(action=>"history", hash_base=>$parent,
file_name=>$diff{'from_file'})},
"history");