From: Chen Linxuan Date: Mon, 25 May 2026 09:00:23 GMT Subject: Re: [PATCH v5 0/2] includeIf: add "worktree" condition for matching working tree path Message-ID: In-Reply-To: On Mon, May 25, 2026 at 3:31 PM Junio C Hamano wrote: > > Chen Linxuan via B4 Relay > 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 /. Here is the trace output from the Windows CI [1]: include_by_path: text='D:/a/git/git/t/trash directory.t1305-config-include', pattern='/**', prefix=0 The pattern worktree:/ becomes /** after add_trailing_starstar_for_dir(). Then wildmatch("/**", "D:/a/git/...", WM_PATHNAME) fails because the text does not start with /. [1] https://github.com/black-desk/git/actions/runs/26391768962/job/77683708185