Re: [PATCH v3 2/2] config: add "worktree" and "worktree/i" includeIf conditions
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 12, 2026, 16:09 UTC
- Message-ID
- <xmqqo6iklid5.fsf@gitster.g>
- In-Reply-To
- <d236de15-f03e-4bac-9eb1-c14e50a271f5@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 19 quoted lines
> On 12/05/2026 08:14, Patrick Steinhardt wrote: > ... >>> Introduce two new condition keywords: >>> >>> - worktree:<pattern> matches the realpath of the current worktree's >>> working directory (i.e. repo_get_work_tree()) against a glob >>> pattern. This is the path returned by git rev-parse >>> --show-toplevel. >>> >>> - worktree/i:<pattern> is the case-insensitive variant. >> >> Seems sensible. > > We already support per-worktree config settings via > extensions.worktreeConfig, so it would be helpful to explain why it is > more convenient to set the config based on the worktree's path, rather > than just running "git config --worktree" inside the worktree. Do you > have multiple repositories with worktrees checked out under a common > prefix that you want to share the same config setting?
Excellent point. The documentation for the new feature may have to be strengthened to suggest which one of the two approaches is more appropriate with what use cases.
Thanks.