diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-03-20 15:53:30 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-03-20 15:53:30 -0700 |
commit | 0f360763c02d1230614e23f94fb298dab0162aa0 (patch) | |
tree | 3c4645bcc34807e9a63b904ea163cc73b8ddd970 /gitweb/gitweb.perl | |
parent | Git 1.7.9.4 (diff) | |
parent | Merge branch 'ks/sort-wildcard-in-makefile' into maint-1.7.8 (diff) | |
download | tgif-0f360763c02d1230614e23f94fb298dab0162aa0.tar.xz |
Merge branch 'maint-1.7.8' into maint
* maint-1.7.8:
t/Makefile: Use $(sort ...) explicitly where needed
gitweb: Fix actionless dispatch for non-existent objects
i18n of multi-line advice messages
Diffstat (limited to 'gitweb/gitweb.perl')
-rwxr-xr-x | gitweb/gitweb.perl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index b9c33ba31d..b67972ec5d 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -1132,8 +1132,10 @@ sub dispatch { if (!defined $action) { if (defined $hash) { $action = git_get_type($hash); + $action or die_error(404, "Object does not exist"); } elsif (defined $hash_base && defined $file_name) { $action = git_get_type("$hash_base:$file_name"); + $action or die_error(404, "File or directory does not exist"); } elsif (defined $project) { $action = 'summary'; } else { @@ -2400,7 +2402,7 @@ sub get_feed_info { return unless (defined $project); # some views should link to OPML, or to generic project feed, # or don't have specific feed yet (so they should use generic) - return if ($action =~ /^(?:tags|heads|forks|tag|search)$/x); + return if (!$action || $action =~ /^(?:tags|heads|forks|tag|search)$/x); my $branch; # branches refs uses 'refs/heads/' prefix (fullname) to differentiate |