git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Devin Doucette" <devin@doucette.cc>
Cc: git@vger.kernel.org, Petr Baudis <pasky@suse.cz>,
	Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Subject: Re: [PATCH] gitweb: Handle actions with no project in evaluate_path_info
Date: Fri, 2 Jan 2009 00:58:29 +0100	[thread overview]
Message-ID: <200901020058.30748.jnareb@gmail.com> (raw)
In-Reply-To: <a899d7ef0812272326j1a407c30k936bf8d8975c9063@mail.gmail.com>

On Sun, 28 Dec 2008, Devin Doucette wrote:

> 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.
>

Thanks for catching this.

Truth to be told we parse action parameter in path_info only since
d8c2882 (gitweb: parse project/action/hash_base:filename PATH_INFO)
by Giuseppe Bilotta (CC-ed; I think he is correct person to give
Ack for this patch). Earlier only "default" actions could be expressed
using only path_info, and project-less 'opml' and 'project_index'
actions are not default actions for projectless URL, so there was no
such problem then.
 
> 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
> 

-- 
Jakub Narebski
Poland

  reply	other threads:[~2009-01-01 23:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-28  7:26 [PATCH] gitweb: Handle actions with no project in evaluate_path_info Devin Doucette
2009-01-01 23:58 ` Jakub Narebski [this message]
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=200901020058.30748.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=devin@doucette.cc \
    --cc=git@vger.kernel.org \
    --cc=giuseppe.bilotta@gmail.com \
    --cc=pasky@suse.cz \
    /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).