Subject: Re: git daemon directory munging?

From: "H. Peter Anvin" <[email-masked]>
Date: Sun, 04 Jun 2006 16:08:51 -0700

Linus Torvalds wrote:
> 
> On Sat, 3 Jun 2006, Jon Loeliger wrote:
>> <jdl> Thus, I'd use something like:
>>       --map-base=www.foo.com/pub/scm:/pub/foo/scm
>>       --map-base=www.bar.com/pub/scm=/pub/bar/scm
> 
> The bigger problem is that nothing actually passes in the hostname to 
> git-daemon in the first place. By the time the git-daemon is contacted, 
> the hostname is long gone ;(

Well, you can bind different git daemons to different IP addresses 
(IP-based vhosting) or different ports (with SRV records in DNS.)

> Now, you can just extend the git protocol to just pass in the host too. 
> 
> You can in fact do this in a backwards-compatible manner (old git-daemons 
> will just ignore it, and new git daemons will automatically notice new 
> clients) with something evil like the appended.
> 

That's actually what was done to HTTP.

> Not tested (and this actualyl doesn't make the daemon _use_ the data, it 
> just adds a comment - the rest "is left as an exercise for the reader")

	-hpa