Re: [PATCH v5 0/2] includeIf: add "worktree" condition for matching working tree path
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 25, 2026, 09:24 UTC
- Message-ID
- <xmqq8q97et9b.fsf@gitster.g>
- In-Reply-To
- <CAC1kPDPbyxs-aTrAOi_PNTZF7EApG31iLYwm+Eddpeh2hT8a-w@mail.gmail.com>
Chen Linxuan <me@black-desk.cn> writes:
Show 19 quoted lines
> On Mon, May 25, 2026 at 3:31 PM Junio C Hamano <gitster@pobox.com> wrote: >> >> Chen Linxuan via B4 Relay <devnull+me.black-desk.cn@kernel.org> >> writes: >> >> > Changes in v5: >> > - Fix Windows CI failure: use `**` glob pattern instead of `/` in the >> > "worktree without repository" tests, since `/` as a path pattern is >> > Unix-specific and does not match Windows paths. >> >> Would it have worked if you used something like "[/\\].path", >> instead of "/.path", to cover directory delimiters for both systems? >> >> I am not asking to make further changes. I am trying to understand >> what the extent of the problem was. > > The root cause is that on Windows, > strbuf_realpath() returns paths with a drive letter prefix (e.g. > D:/a/git/...), which does not start with /.
Ahh, OK, so the "Changes in v5" description was misleading.
This exchange suggests that the use of **/.path in the test deserves some in-code comment to explain why we use such an unusual and loose construct.
Thanks.