summaryrefslogtreecommitdiff
path: root/gitweb/gitweb.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-03-20 15:53:30 -0700
committerJunio C Hamano <gitster@pobox.com>2012-03-20 15:53:30 -0700
commit0f360763c02d1230614e23f94fb298dab0162aa0 (patch)
tree3c4645bcc34807e9a63b904ea163cc73b8ddd970 /gitweb/gitweb.perl
parenta46034819ecce6872bff099f3d75589f4d38c00c (diff)
parentd4c813d47d5c4f821a6947a29e4a480ec6522f44 (diff)
downloadgit-0f360763c02d1230614e23f94fb298dab0162aa0.tar.gz
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-xgitweb/gitweb.perl4
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