git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: t6200: avoid path mangling issue on Windows

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Apr 21, 2013, 06:35 UTC
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:
Show 8 quoted lines
>>> 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
Previous: Johannes SixtNext: Junio C Hamano
Message 11 of 12 in “fmt-merge-msg: respect core.commentchar in people credits”
  1. 1/2 fmt-merge-msg: respect core.commentchar in people creditsRalf Thielow, Apr 7, 2013
  2. 2/2 fmt-merge-msg: use core.commentchar in tag signatures completelyRalf Thielow, Apr 7, 2013
  3. t6200: avoid path mangling issue on WindowsJohannes Sixt, Apr 18, 2013
  4. Junio C HamanoApr 18, 2013
  5. Johannes SixtApr 19, 2013
  6. Junio C HamanoApr 19, 2013
  7. Johannes SixtApr 19, 2013
  8. Junio C HamanoApr 19, 2013
  9. Jonathan NiederApr 21, 2013
  10. Johannes SixtApr 21, 2013
  11. Jonathan NiederApr 21, 2013
  12. Junio C HamanoApr 21, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.