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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 20 Feb 2008, Linus Torvalds wrote:

> On Wed, 20 Feb 2008, Jay Soffian wrote:
> 
> > On Wed, Feb 20, 2008 at 7:47 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> > >
> > >  In either case, I think a good approach to take is to find a
> > >  wording that conveys the notion "I will use A to mean what some
> > >  other people might call B or C" unambiguously.
> > 
> > [url A]
> >   other_people_call_it = B
> >   other_people_call_it = C
> > 
> > [local_url A]
> >   external_url = B
> >   external_url = C
> 
> Well, realistically, what's really the use of this?
> 
> 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.
> 
> The reason may be some local protocol issue: let's say that you see all 
> these pointers to git://git.kernel.org/ flying around, because that is the 
> official home of the git repository itself, but you work at a company that 
> has a firewall that doesn't let git through. So you want to still *use* 
> those names that other people use, but you want to remap them through some 
> proxy server (or a local cache), or just to use ssh instead.
> 
> 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).
> 
> So I think it really boils down to the fact that you want to "rewrite" the 
> thing. Not aliases, not "also known as", but you're logically really 
> looking for something like 
> 
> 	[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.

I think it has to be:

	[something "rewritten"]
		something = "original"
		something = "other original"

Because you want to be able to take multiple "original"s for the same 
result in order to avoid duplicating that part (and leading to skew if you 
decide to change). But I like the idea of basing the naming on the 
rewriting operation rather than the relationship. Maybe:

[url "rewritten"]
	insteadOf = "original"

	-Daniel
*This .sig left intentionally blank*
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux