From: Jonathan Nieder Date: Sun, 21 Apr 2013 06:35:50 GMT Subject: Re: t6200: avoid path mangling issue on Windows Message-ID: <20130421063550.GC10429@elie.Belkin> In-Reply-To: <517385A6.8020908@kdbg.org> Johannes Sixt wrote: > Am 21.04.2013 02:05, schrieb Jonathan Nieder: >> Junio C Hamano wrote: >>> But a _real user_ who wants to use a slash there has no way of doing >>> so. >> >> Doesn't foo=// do that in the msys world? If I am reading >> mingw/msys/rt/src/winsup/cygwin/path.cc correctly then the way to pass >> a true double-slash is foo=///. > > That would be totally unexpected. There is an exception to the path mangling for //unc/paths, if that's what you mean. >From [1]: if (path[0] == '/' && path[1] == '/') { int tidx = 2; while (spath[tidx] && spath[tidx] == '/') tidx++; if (strchr (&spath[tidx], '/')) { retpathcpy (spath); } else { retpathcpy (&spath[1]); } return ScrubRetpath (retpath); } I haven't tested, since I don't have easy access to a Windows test setup. Regards, Jonathan [1] http://mingw.cvs.sourceforge.net/viewvc/mingw/msys/rt/src/winsup/cygwin/path.cc?content-type=text%2Fplain