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

Re: [PATCH] t0060: loosen overly strict expectations

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Jan 14, 2016, 18:13 UTC
Message-ID
<5697E550.9020102@ramsayjones.plus.com>
In-Reply-To
<xmqqziw8jcbr.fsf@gitster.mtv.corp.google.com>
On 14/01/16 17:33, Junio C Hamano wrote:
Show 26 quoted lines
> Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> 
> Also...
> 
>> -#if defined(__MINGW32__)
>> -	/* the following is clearly wrong ... */
>> -	{ "C:",              "."      },
>> -#endif
>> -
>> -#if defined(_MSC_VER)
>> -	{ "C:",              "C:."    },
>> -#endif
>> -
>> -#endif
>> +	{ "C:",              "C:.", "." },
>>  #endif
> 
> "C:" is still allowed to go to "."; is it still "clearly wrong",
> or do we have a reason why we think it is not wrong at all?
> 
> I think the comment was written by Ramsay and also suspect that you
> did not specifically agree or disagree with that particular
> decision, so I'd understand if you do not have a strong opinion
> either way, but I'd like to hear from Ramsay.  Perhaps earlier we
> thought it was clearly wrong but we no longer do?
> 

Yes, that comment was mine. The result is "clearly wrong" if you follow the POSIX rules [1], but that may not translate exactly to a dos like path. ;-)

I think the question is: does it make a difference if you call chdir() on the result? Which brings up something which I have been ignoring. Correct me if I'm wrong (quite possible), but _each_ drive has a current working directory associated with it in win32, so it's a bit difficult to use drive designators with a relative path (eg. C:usr/lib).

Note: The test data in the test-libgen.c file was using Linux
as the 'benchmark' for the POSIX paths and IIRC MinGW-32 for
the dos paths. (Note that I said 'benchmark' _not_ 'correct'). :-P

ATB, Ramsay Jones

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/dirname.html
Previous: Junio C HamanoNext: Johannes Sixt
Message 3 of 13 in “t0060: loosen overly strict expectations”
  1. t0060: loosen overly strict expectationsJohannes Schindelin, Jan 14, 2016
  2. Junio C HamanoJan 14, 2016
  3. Ramsay JonesJan 14, 2016
  4. Johannes SixtJan 14, 2016
  5. Ramsay JonesJan 15, 2016
  6. Johannes SchindelinJan 15, 2016
  7. Ramsay JonesJan 15, 2016
  8. Johannes SixtJan 15, 2016
  9. Ramsay JonesJan 15, 2016
  10. Eric SunshineJan 14, 2016
  11. Johannes SchindelinJan 15, 2016
  12. Junio C HamanoJan 15, 2016
  13. Johannes SchindelinJan 19, 2016

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.