git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Devin Doucette" <devin@doucette.cc>
To: git@vger.kernel.org
Cc: "Jakub Narebski" <jnareb@gmail.com>,
	"Petr Baudis" <petr.baudis@novartis.com>
Subject: [PATCH] gitweb: Handle actions with no project in evaluate_path_info
Date: Sun, 28 Dec 2008 00:26:52 -0700	[thread overview]
Message-ID: <a899d7ef0812272326j1a407c30k936bf8d8975c9063@mail.gmail.com> (raw)

The action would not be set if no valid project was found in
path_info. Removing the return if the project was not specified fixes
the project_index and opml actions when using path_info.

Signed-off-by: Devin Doucette <devin@doucette.cc>
---
 gitweb/gitweb.perl |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 8f574c7..b6a8ea9 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -552,8 +552,7 @@ sub evaluate_path_info {
 	while ($project && !check_head_link("$projectroot/$project")) {
 		$project =~ s,/*[^/]*$,,;
 	}
-	return unless $project;
-	$input_params{'project'} = $project;
+	$input_params{'project'} = $project if $project;

 	# do not change any parameters if an action is given using the query string
 	return if $input_params{'action'};
-- 
1.6.1.rc4

             reply	other threads:[~2008-12-28  7:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-28  7:26 Devin Doucette [this message]
2009-01-01 23:58 ` [PATCH] gitweb: Handle actions with no project in evaluate_path_info Jakub Narebski
2009-01-02  0:46   ` Giuseppe Bilotta
2009-01-02  2:21     ` Devin Doucette
2009-01-02 12:09       ` Giuseppe Bilotta

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=a899d7ef0812272326j1a407c30k936bf8d8975c9063@mail.gmail.com \
    --to=devin@doucette.cc \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=petr.baudis@novartis.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).