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

Re: [PATCH 2/2] Add support for url aliases in config files

From
Jon Loeliger <jdl@freescale.com>
Date
Feb 21, 2008, 16:31 UTC
Message-ID
<47BDA74D.8080608@freescale.com>
In-Reply-To
<alpine.LFD.1.00.0802201735030.7833@woody.linux-foundation.org>
Linus Torvalds wrote:
Show 6 quoted lines
> 
> The only really sane use of this is the one that Daniel started out with: 
> you may have a "external" representation of a name, but for your own 
> purely local configuration reasons, you may want to map that name into 
> another one that works for you.
> 
[ snip ]
Show 6 quoted lines
> So it's generally *not* that it's an "alias" for another site, since it 
> isn't that in general - it may just be a very local configuration thing. 
> It's also not really that you would call it one thing and others would 
> call it another thing: you want to call it the *same* thing as others call 
> it, but you want to work around some specific site issue (or just use a 
> cache that is closer without having to think about it).
I totally agree with all that.
Show 20 quoted lines
> 	[access "git://git.kernel.org/*"]
> 		proxy = proxy-program
> 		url = "ssh://master.kernel.org/*"
> 
> which admittedly looks rather strange too, but at the same time it does 
> make sense from a "what do we really want to do?" standpoint.
> 
> Of course, in this case Daniel didn't actually do that "proxy" part, but I 
> think the argument that we should try to make the config file syntax 
> describe what the user wants to do is still very true. So skip that 
> "proxy" part (maybe somebody wants to do that too some day), and leave the 
> 
> 	[access "original"]
> 		url = "rewritten"
> 
> kind of syntax.
> 
> (And no, I'm not at all married to the "access" and "url" parts - I don't 
> care. I'm just saying that syntax should be tied to what people want to 
> do, not anything else.

Right. And I think part of the issue is, which of the two forms will be present in the user's git requests? He'd _like_ to use the same, canonical name everyone else does, but for whatever reason, it has to be rewritten for the actual transportation implementation to work. Sort of like virtual/physical address definitions here?

    [virtual_url "git://git.kernel.org/"]
        physical_url = "ssh://master.kernel.org/"
But maybe it needs to be:
    physical_url ["ssh://master.kernel.org/"]
        virtual_url = "git://git.kernel.org/"
        virtual_url = "git://kernel.org/"

The git user would use the virtual_url, but it would be translated to the physical_url for the underlying implementation to work.

I think it is more than paint coloring at work here. The important part is to convey the concepts properly with the names. The reader of the config file has to be able to tell which way the mapping is run.

jdl
Previous: Daniel BarkalowNext: Jay Soffian
Message 19 of 22 in “Add support for url aliases in config files”
  1. 2/2 Add support for url aliases in config filesDaniel Barkalow, Feb 20, 2008
  2. Junio C HamanoFeb 20, 2008
  3. Daniel BarkalowFeb 20, 2008
  4. Junio C HamanoFeb 20, 2008
  5. Jay SoffianFeb 20, 2008
  6. Daniel BarkalowFeb 20, 2008
  7. しらいしななこFeb 20, 2008
  8. Johannes SchindelinFeb 20, 2008
  9. Junio C HamanoFeb 21, 2008
  10. Jay SoffianFeb 21, 2008
  11. Linus TorvaldsFeb 21, 2008
  12. Jay SoffianFeb 21, 2008
  13. Daniel BarkalowFeb 21, 2008
  14. Junio C HamanoFeb 21, 2008
  15. Junio C HamanoFeb 25, 2008
  16. Daniel BarkalowFeb 25, 2008
  17. Junio C HamanoFeb 25, 2008
  18. Daniel BarkalowFeb 25, 2008
  19. Jon LoeligerFeb 21, 2008
  20. Jay SoffianFeb 20, 2008
  21. Junio C HamanoFeb 20, 2008
  22. Jay SoffianFeb 20, 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.