From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] gitweb: more support for PATH_INFO based URLs
Date: Sun, 17 Sep 2006 15:18:29 +0200 [thread overview]
Message-ID: <eejhtr$paa$1@sea.gmane.org> (raw)
In-Reply-To: 20060916210832.GV17042@admingilde.org
Martin Waitz wrote:
> Now three types of path based URLs are supported:
> gitweb.cgi/project.git
> gitweb.cgi/project.git/branch
> gitweb.cgi/project.git/branch/filename
>
> The first one (show project summary) was already supported for a long time
> now. The other two are new: they show the shortlog of a branch or
> the plain file contents of some file contained in the repository.
> + if ($path_info =~ m,^$project/([^/]+)/(.+)$,) {
> + # we got "project.git/branch/filename"
> + $action ||= "blob_plain";
> + $hash_base ||= $1;
> + $file_name ||= $2;
> + } elsif ($path_info =~ m,^$project/([^/]+)$,) {
> + # we got "project.git/branch"
> + $action ||= "shortlog";
> + $hash ||= $1;
> + }
I'm sorry, but I realized that I didn't think and check this patch through.
First, this patch spews a bunch of warnings: when PATH_INFO is empty, when
we undefine $project etc. The patches by me and by matled try to address
and remove those warnings, but I'm sure we missed some.
Second, the whole concept of third type of path (path_info) based URL is
flawed: branches can also be hierarchical (for example Junio uses
<initals>/<topic> topic branches, although they are not published).
Therefore it is much harder to distinguish where branchname ends and
filename begins. The patch assumes that branches are flat. So for example
for branch with the name like "gitweb/xmms2" the types 2 and 3 wouldn't
work; and type 1 worked before this patch.
Therefore I rescind my Ack.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
next prev parent reply other threads:[~2006-09-17 13:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-16 21:08 [PATCH] gitweb: more support for PATH_INFO based URLs Martin Waitz
2006-09-16 21:46 ` Jakub Narebski
2006-09-17 12:14 ` [PATCH] gitweb: fix warnings from dd70235f5a81e (PATH_INFO) Matthias Lederhofer
2006-09-17 21:34 ` Junio C Hamano
2006-09-17 13:18 ` Jakub Narebski [this message]
2006-09-17 14:20 ` [PATCH] gitweb: more support for PATH_INFO based URLs Jakub Narebski
2006-09-19 8:19 ` Martin Waitz
2006-09-19 9:49 ` Jakub Narebski
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='eejhtr$paa$1@sea.gmane.org' \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/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).