git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add support for host aliases in config files

From
Jakub Narebski <jnareb@gmail.com>
Date
Jan 25, 2008, 21:51 UTC
Message-ID
<200801252251.42760.jnareb@gmail.com>
In-Reply-To
<alpine.LNX.1.00.0801251436060.13593@iabervon.org>
On Fri, 25 Jan 2008, Daniel Barkalow wrote:
Show 34 quoted lines
> 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
Previous: Daniel BarkalowNext: Junio C Hamano
Message 7 of 10 in “Add support for host aliases in config files”
  1. Add support for host aliases in config filesDaniel Barkalow, Jan 25, 2008
  2. Jakub NarebskiJan 25, 2008
  3. Junio C HamanoJan 25, 2008
  4. Daniel BarkalowJan 25, 2008
  5. Jakub NarebskiJan 25, 2008
  6. Daniel BarkalowJan 25, 2008
  7. Jakub NarebskiJan 25, 2008
  8. Junio C HamanoJan 25, 2008
  9. Daniel BarkalowJan 25, 2008
  10. Jakub NarebskiJan 25, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.