From: Jakub Narebski <jnareb@gmail.com>
To: Matt McCutchen <matt@mattmccutchen.net>
Cc: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH try 2] gitweb: Add option to put a trailing slash on pathinfo-style project URLs
Date: Mon, 15 Dec 2008 00:39:57 +0100 [thread overview]
Message-ID: <200812150039.58797.jnareb@gmail.com> (raw)
In-Reply-To: <1229217235.3360.13.camel@mattlaptop2.local>
On Sun, 14 Dec 2008, Matt McCutchen wrote:
> On Sat, 2008-12-13 at 23:23 +0100, Giuseppe Bilotta wrote:
>> On Sat, Dec 13, 2008 at 10:47 PM, Jakub Narebski <jnareb@gmail.com> wrote:
>>> Matt McCutchen <matt@mattmccutchen.net> writes:
>>>
>>>> My Web site uses pathinfo mode and some rewrite magic to show the gitweb
>>>> interface at the URL of the real repository directory (which users also
>>>> pull from). In this case, it's desirable to end generated links to the
>>>> project in a trailing slash so the Web server doesn't have to redirect
>>>> the client to add the slash. This patch adds a second element to the
>>>> "pathinfo" feature configuration to control the trailing slash.
>>>>
>>>> Signed-off-by: Matt McCutchen <matt@mattmccutchen.net>
[...]
>>>
>>> Errr... I see that it adds trailing slash only for project-only
>>> path_info links, but the commit message was not entirely clear for me.
>>
>> If indeed the additional / is only asked for in summary view, I think
>> there's no need for a feature toggle, we can always put it there. If
>> not, I'm really curious about seeing the rewrite rules (they might
>> also be worth adding to the gitweb documentation as examples of 'power
>> usage').
>
> The trailing slash is used only when the URL refers to a project with no
> appended parameters (i.e., summary view), because the URL refers to the
> real git dir on disk (hence, pulling from the same URL) and it plays
> nicer with the Web server configuration to have the trailing slash.
It would be nice to have in commit message that we want to have
trailing slash in the cases where URL can correspond to filesystem
path.
But there are two cases:
* http://example.com/ corresponding to $projectroot on filesystem,
and giving projects_list in gitweb
* http://example.com/project.git/ corresponding to project.git dir
on filesystem, and giving project summary view in gitweb.
> I was wary about changing the default behavior, but if you and Jakub
> both think it's OK, that's great.
Now I'm not so sure... but I guess the performance cost would be
negligible, and I'm not sure if it would be worth slight complication
in the code (and configuration).
> I was thinking of proposing the addition of some info about my setup,
> including the rewrite rules, to the documentation. Maybe we could do
> that after dealing with the patches.
Do you plan updating "Webserver configuration" section in
gitweb/README?
BTW. could you please check if the $my_uri and $my_link need to be set
in gitweb config for your configuration, or did some of Giuseppe's
path_info improvements took care of that, and it is no longer needed?
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2008-12-14 23:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-13 19:10 [PATCH] gitweb: Add option to put a trailing slash on pathinfo-style project URLs Matt McCutchen
2008-12-13 21:11 ` [PATCH try 2] " Matt McCutchen
2008-12-13 21:47 ` Jakub Narebski
2008-12-13 22:23 ` Giuseppe Bilotta
2008-12-14 1:13 ` Matt McCutchen
2008-12-14 23:39 ` Jakub Narebski [this message]
2008-12-14 23:55 ` Jakub Narebski
2008-12-13 22:37 ` Junio C Hamano
2008-12-14 1:43 ` Matt McCutchen
2008-12-14 23:20 ` Jakub Narebski
2008-12-14 23:58 ` 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=200812150039.58797.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=giuseppe.bilotta@gmail.com \
--cc=matt@mattmccutchen.net \
/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).