From: "Aneesh Kumar K.V" <aneesh.kumar@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] gitweb: Fix git_blame
Date: Fri, 01 Sep 2006 09:13:32 +0530 [thread overview]
Message-ID: <ed8a90$pfn$1@sea.gmane.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: 0001-gitweb-Fix-git_blame.txt --]
[-- Type: text/plain, Size: 1806 bytes --]
Converting the default values to array broke the git blame enable
disable support. Fix the same.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
---
gitweb/gitweb.perl | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0984e85..57ffa25 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);
--
1.4.2.rc1.g83e1-dirty
next reply other threads:[~2006-09-01 3:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-01 3:43 Aneesh Kumar K.V [this message]
2006-09-01 9:07 ` [PATCH] gitweb: Fix git_blame Jakub Narebski
2006-09-01 19:31 ` [PATCH] gitweb: gitweb_check_feature always return list Jakub Narebski
2006-09-01 19:37 ` Junio C Hamano
2006-09-01 19:48 ` Jakub Narebski
2006-09-01 20:12 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='ed8a90$pfn$1@sea.gmane.org' \
--to=aneesh.kumar@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.