From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: Patrick Steinhardt <ps@pks.im>,
me@black-desk.cn, git@vger.kernel.org,
Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Subject: Re: [PATCH v3 2/2] config: add "worktree" and "worktree/i" includeIf conditions
Date: Wed, 13 May 2026 01:09:42 +0900 [thread overview]
Message-ID: <xmqqo6iklid5.fsf@gitster.g> (raw)
In-Reply-To: <d236de15-f03e-4bac-9eb1-c14e50a271f5@gmail.com> (Phillip Wood's message of "Tue, 12 May 2026 16:07:12 +0100")
Phillip Wood <phillip.wood123@gmail.com> writes:
> 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.
next prev parent reply other threads:[~2026-05-12 16:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-03 7:02 [PATCH v3 0/2] includeIf: add "worktree" condition for matching working tree path Chen Linxuan via B4 Relay
2026-04-03 7:02 ` [PATCH v3 1/2] config: refactor include_by_gitdir() into include_by_path() Chen Linxuan via B4 Relay
2026-05-12 7:13 ` Patrick Steinhardt
2026-04-03 7:02 ` [PATCH v3 2/2] config: add "worktree" and "worktree/i" includeIf conditions Chen Linxuan via B4 Relay
2026-05-12 7:14 ` Patrick Steinhardt
2026-05-12 15:07 ` Phillip Wood
2026-05-12 16:09 ` Junio C Hamano [this message]
2026-05-13 2:55 ` Chen Linxuan
2026-05-13 2:47 ` Chen Linxuan
2026-05-13 5:56 ` Patrick Steinhardt
2026-05-12 6:41 ` [PATCH v3 0/2] includeIf: add "worktree" condition for matching working tree path Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqo6iklid5.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=kristofferhaugsbakk@fastmail.com \
--cc=me@black-desk.cn \
--cc=phillip.wood123@gmail.com \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox