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

Re: [PATCH] fixup! log: add exhaustive tests for pattern style options & config

From
Jonathan Nieder <jrnieder@gmail.com>
Date
May 15, 2017, 19:04 UTC
Message-ID
<20170515190415.GM27400@aiede.svl.corp.google.com>
In-Reply-To
<alpine.DEB.2.21.1.1705132037050.146734@virtualbox>
Hi,
Johannes Schindelin wrote:
> On Fri, 12 May 2017, Jonathan Nieder wrote:
Show 8 quoted lines
>> Would something like
>>
>> 	test PIPE_IN_FILENAME '
>> 		>"a|b" &&
>> 		test -f "a|b"
>> 	'
>>
>> work?
[...]
Show 17 quoted lines
> Back to the subject: The MSYS2 emulation layer inherits a neat trick from
> Cygwin, where it *can* create file names containing pipe symbols. They
> will be quietly mapped into a private UTF-8 page, and when Cygwin or MSYS2
> read the file back, the file name maps from this page back to ASCII
> transparently.
>
> That strategy is all good and dandy, as long as you stay within the POSIX
> emulation layer.
>
> Git for Windows avoids the POSIX emulation layer as much as possible, for
> speed, and also for robustness.
>
> Which means that Git does *not* map the file names using said private
> UTF-8 code page. And therefore, your test would succeed (because the shell
> script would stay within the POSIX emulation layer, which creates that
> file using above-mentioned strategy), but Git (being a regular Win32
> program) *still* would fail to create said file.
Wow.  Thanks for a clear explaination.

I'll be keeping a copy of this message handy for the next time I'm confused about filename handling in the testsuite on Windows.

Sincerely, Jonathan

Previous: Johannes SchindelinNext: Ævar Arnfjörð Bjarmason
Message 6 of 11 in “fixup! log: add exhaustive tests for pattern style options & config”
  1. fixup! log: add exhaustive tests for pattern style options & configJohannes Schindelin, May 12, 2017
  2. Junio C HamanoMay 12, 2017
  3. Jonathan NiederMay 12, 2017
  4. Ævar Arnfjörð BjarmasonMay 13, 2017
  5. Johannes SchindelinMay 13, 2017
  6. Jonathan NiederMay 15, 2017
  7. Ævar Arnfjörð BjarmasonMay 13, 2017
  8. Junio C HamanoMay 15, 2017
  9. Johannes SchindelinMay 15, 2017
  10. Junio C HamanoMay 16, 2017
  11. Ævar Arnfjörð BjarmasonMay 16, 2017

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.