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