diff options
| author | Junio C Hamano <junkio@cox.net> | 2006-09-02 17:10:16 -0700 |
|---|---|---|
| committer | Junio C Hamano <junkio@cox.net> | 2006-09-02 17:10:16 -0700 |
| commit | 1bbb2cff62a7c9ff136d17723b30951159e6291a (patch) | |
| tree | 61f46f0a8b9659b95b6096a8d6c3bb92fadf01ba /gitweb | |
| parent | 7cf67205ca68a157c6ffdb4e5a4ff231217c0871 (diff) | |
| parent | 6ce4e61f1be690681f6494eb5ca26540c2316f81 (diff) | |
| download | git-1bbb2cff62a7c9ff136d17723b30951159e6291a.tar.xz | |
Merge branch 'master' into cc/trace
* master:
Trace into a file or an open fd and refactor tracing code.
Replace uses of strdup with xstrdup.
consolidate two copies of new style object header parsing code.
Documentation: Fix howto/revert-branch-rebase.html generation
fmt-merge-msg: fix off-by-one bug
git-rev-list(1): group options; reformat; document more options
Constness tightening for move/link_temp_to_file()
gitweb: Fix git_blame
Include config.mak.autogen in the doc Makefile
Use xmalloc instead of malloc
git(7): move gitk(1) to the list of porcelain commands
gitk: Fix some bugs in the new cherry-picking code
gitk: Improve responsiveness while reading and layout out the graph
gitk: Update preceding/following tag info when creating a tag
gitk: Add a menu item for cherry-picking commits
gitk: Fix a couple of buglets in the branch head menu items
gitk: Add a context menu for heads
gitk: Add a row context-menu item for creating a new branch
gitk: Recompute ancestor/descendent heads/tags when rereading refs
gitk: Minor cleanups
Diffstat (limited to 'gitweb')
| -rwxr-xr-x | gitweb/gitweb.perl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 0984e85623..57ffa25070 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); |
