git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] Add support for host aliases in config files
Date: Fri, 25 Jan 2008 22:51:42 +0100	[thread overview]
Message-ID: <200801252251.42760.jnareb@gmail.com> (raw)
In-Reply-To: <alpine.LNX.1.00.0801251436060.13593@iabervon.org>

On Fri, 25 Jan 2008, Daniel Barkalow wrote:
> On Fri, 25 Jan 2008, Jakub Narebski wrote:
> 
>>
>> So this config variable is actually about _rewriting_ URLs, rather than
>> having multiple _alternate_ URLs to fetch from. IMHO either the
>> documentation above should be (re)written better (there is time, as we
>> are in feature freeze), or the example mentioned above should be added
>> (but where?).
> 
> Maybe we should have a "host.<name>.*" section that explains the 
> collection of configuration options as a group? Like:
> 
> ----------
> host.<name>.*::
> 	These options provide a way to rewrite URLs when there is a
> 	pattern of URLs with a common prefix which should be replaced
> 	with a different prefix. For every 'alias' prefix given, any
> 	URL git receives that starts with that prefix will be
> 	rewritten to have the 'base' prefix instead. In cases where
> 	some site serves a large number of repositories, and serves
> 	them with multiple access methods, and some users need to use
> 	different access methods, this feature allows people to
> 	specify any of the equivalent URLs and have git automatically
> 	rewrite the URL to the best alternative for the particular
> 	user, even for a never-before-seen repository on the site.
> 
> host.<name>.base::
> 	The base URL which should be used for this particular
> 	host.
> 
> host.<name>.alias::
> 	Additional base URLs which refer to this host. If a URL
> 	matches this, any access to it will use the URL formed with
> 	the corresponding base URL instead of the given URL.

Good idea. IMVHO it reads better than previous version. Together with
explanation and example usage in Documentation/urls.txt (or somewhere
else) it would be enough and easy to understand.

BTW. shouldn't it be rather host.<name>.rewritebase (a la mod_rewrite)?
I think it is better name for this configuration variable.

-- 
Jakub Narebski
Poland

  reply	other threads:[~2008-01-25 21:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-25 18:39 [PATCH] Add support for host aliases in config files Daniel Barkalow
2008-01-25 18:52 ` Jakub Narebski
2008-01-25 19:01   ` Junio C Hamano
2008-01-25 19:09   ` Daniel Barkalow
2008-01-25 19:33     ` Jakub Narebski
2008-01-25 19:53       ` Daniel Barkalow
2008-01-25 21:51         ` Jakub Narebski [this message]
2008-01-25 20:19       ` Junio C Hamano
2008-01-25 21:12         ` Daniel Barkalow
2008-01-25 21:48           ` Jakub Narebski
  -- strict thread matches above, loose matches on Subject: below --
2008-02-17 18:38 Daniel Barkalow
2008-02-17 18:48 ` Jakub Narebski
2008-02-17 18:58   ` Daniel Barkalow
2008-02-17 19:36 ` Johannes Schindelin
2008-02-18  4:52 ` Junio C Hamano
2008-02-18 19:29   ` Daniel Barkalow

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=200801252251.42760.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.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).