Re: [PATCH/RFC] daemon.c: replace inet_ntop with getnameinfo
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- May 7, 2009, 13:34 UTC
- Message-ID
- <m3tz3xm3zt.fsf@localhost.localdomain>
- In-Reply-To
- <EC96A79E-4D4E-467A-A10F-D905FE02E508@gmail.com>
Benjamin Kramer <benny.kra@googlemail.com> writes:
Show 22 quoted lines
> Andreas Ericsson wrote: > > > What per-IP directories are you talking about? > > git daemon has a feature called interpolated paths > > If git daemon is started like this: > git daemon --interpolated-path=%IP/%D > (the machine has two IPs: 123.123.123.123 (v4) and 2001:db8::1 (v6)) > and someone clones a repository: > git clone git://123.123.123.123/frotz > git daemon will look for the repository in the directory > `123.123.123.123/frotz' > > But if git daemon listens on the IPv6 interface and someone clones a > repository: > git clone git://2001:db8::1/frotz > Then git daemon will look for the repository in `0.0.0.0/frotz' > > My patch makes it converting IPv6 addresses properly and if you the > clone in my previous example it'll now look in `2001:db8::1/frotz' > (with colons in the directory name)
BTW. this is not only MS Windows that have problems with ':' in paths (because of it being drive letter separator), but also IIRC MacOS X, where ':' and not '/' is directory separator.
The fact that ':' is separator of paths in $PATH environmental variable is a bit complication, but you can always escape ':' in $PATH.
-- Jakub Narebski Poland ShadeHawk on #git