From: H. Peter Anvin Date: Sun, 04 Jun 2006 23:08:51 GMT Subject: Re: git daemon directory munging? Message-ID: <44836803.5070405@zytor.com> In-Reply-To: Linus Torvalds wrote: > > On Sat, 3 Jun 2006, Jon Loeliger wrote: >> 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