From: Junio C Hamano Date: Thu, 28 May 2026 20:25:35 GMT Subject: Re: [PATCH] t3070: skip ls-files tests with backslash patterns on Windows Message-ID: In-Reply-To: "Kristofer Karlsson via GitGitGadget" writes: > From: Kristofer Karlsson > > On Windows (MINGW), backslashes in pathspecs are silently converted to > forward slashes (directory separators), which changes the glob semantics. > This causes 36 test failures in t3070-wildmatch when the "via ls-files" > variants test patterns containing backslash escapes (e.g. '\[ab]', > '[\-_]', '[A-\\]'). > > The wildmatch function itself handles these patterns correctly — only the > ls-files code path fails because pathspec parsing converts the > backslashes before they reach the glob matcher. > > Skip these ls-files tests on platforms where BSLASHPSPEC is not set, > which is the existing prereq that captures exactly this semantic: > "backslashes in pathspec are not directory separators." > > Signed-off-by: Kristofer Karlsson > --- Thanks for noticing and addressing this. I think we fairly recently started seeing this in GitHub actions CI, which puzzles me since neither t3070 or wildmatch.[ch] have changed for quite some time. 8a6d158a (doc: document backslash in gitignore patterns, 2025-10-29) added a few lines to the test about matching with backslash to t3070. Two questions. * Has this been broken on Windows since October, or has something external change on Windows recently? I do not know. Anybody knows? * Is this change a workaround that sweeps ugly breakage under the rug, or is backslash inherently unusable as an excape character when handling paths on Windows (which I am afraid would make wildmatch fairly useless there)? Will queue. Thanks.