aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@gmail.com>2006-09-01 09:13:32 +0530
committerJunio C Hamano <junkio@cox.net>2006-08-31 21:10:17 -0700
commit1d3fc68ae711b3f46aea02f8d819423cf8780b7d (patch)
tree8eaa512b05bb64ccfdbaa2c908eed426ad887fa3 /gitweb
parent95676853b2dc5d610a6f917aac37cbb12c57fcd2 (diff)
downloadgit-1d3fc68ae711b3f46aea02f8d819423cf8780b7d.tar.gz
git-1d3fc68ae711b3f46aea02f8d819423cf8780b7d.tar.xz
gitweb: Fix git_blame
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl10
1 files changed, 6 insertions, 4 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0984e8562..57ffa2507 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2251,7 +2251,8 @@ sub git_blame2 {
my $fd;
my $ftype;
- if (!gitweb_check_feature('blame')) {
+ my ($have_blame) = gitweb_check_feature('blame');
+ if (!$have_blame) {
die_error('403 Permission denied', "Permission denied");
}
die_error('404 Not Found', "File name not defined") if (!$file_name);
@@ -2320,7 +2321,8 @@ HTML
sub git_blame {
my $fd;
- if (!gitweb_check_feature('blame')) {
+ my ($have_blame) = gitweb_check_feature('blame');
+ if (!$have_blame) {
die_error('403 Permission denied', "Permission denied");
}
die_error('404 Not Found', "File name not defined") if (!$file_name);
@@ -2494,7 +2496,7 @@ sub git_blob {
die_error(undef, "No file name defined");
}
}
- my $have_blame = gitweb_check_feature('blame');
+ my ($have_blame) = gitweb_check_feature('blame');
open my $fd, "-|", git_cmd(), "cat-file", "blob", $hash
or die_error(undef, "Couldn't cat $file_name, $hash");
my $mimetype = blob_mimetype($fd, $file_name);
@@ -2570,7 +2572,7 @@ sub git_tree {
my $ref = format_ref_marker($refs, $hash_base);
git_header_html();
my $base = "";
- my $have_blame = gitweb_check_feature('blame');
+ my ($have_blame) = gitweb_check_feature('blame');
if (defined $hash_base && (my %co = parse_commit($hash_base))) {
git_print_page_nav('tree','', $hash_base);
git_print_header_div('commit', esc_html($co{'title'}) . $ref, $hash_base);