From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: Chen Linxuan <me@black-desk.cn>,
git@vger.kernel.org,
Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>,
Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: Re: [PATCH v6 2/2] config: add "worktree" and "worktree/i" includeIf conditions
Date: Tue, 07 Jul 2026 12:23:49 -0700 [thread overview]
Message-ID: <xmqqfr1u38oq.fsf@gitster.g> (raw)
In-Reply-To: <ak0am-pEdtOvyBp4@pks.im> (Patrick Steinhardt's message of "Tue, 7 Jul 2026 17:26:19 +0200")
Patrick Steinhardt <ps@pks.im> writes:
>> > The last call to git-config(1) fails, which is inconsistent with how
>> > resolve the path for "gitdir".
>>
>> I investigated the symlink mismatch.
>> ...
>> My current possible v7 approach is to keep `repo->worktree` canonical,
>> but store an additional absolute, normalized, non-realpath worktree path
>> for `includeIf.worktree`. For the ordinary discovered-repository case,
>> this has to be derived in `setup_discovered_git_dir()` from physical
>> `cwd`, the worktree-root offset, and a validated `$PWD`, because
>> `set_git_work_tree()` is otherwise only called with `"."`.
>>
>> This makes your suggested test pass, but the plumbing is less trivial
>> than the original patch. Does this approach sound reasonable, or would
>> you prefer different semantics for symlinked worktree paths?
>
> It certainly sounds a bit ugly, but I'd rather have something that's
> ugly than something that's inconsistent for our users *shrug*
OK, so I'd expect v7 to come and then we hopefully can declare
victory ;-). Thanks, both.
prev parent reply other threads:[~2026-07-07 19:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 3:13 [PATCH v6 0/2] includeIf: add "worktree" condition for matching working tree path Chen Linxuan via B4 Relay
2026-07-03 3:13 ` [PATCH v6 1/2] config: refactor include_by_gitdir() into include_by_path() Chen Linxuan via B4 Relay
2026-07-03 3:13 ` [PATCH v6 2/2] config: add "worktree" and "worktree/i" includeIf conditions Chen Linxuan via B4 Relay
2026-07-03 9:02 ` Junio C Hamano
2026-07-03 11:02 ` Patrick Steinhardt
2026-07-06 12:18 ` Chen Linxuan
2026-07-07 15:26 ` Patrick Steinhardt
2026-07-07 19:23 ` Junio C Hamano [this message]
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=xmqqfr1u38oq.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=kristofferhaugsbakk@fastmail.com \
--cc=me@black-desk.cn \
--cc=phillip.wood@dunelm.org.uk \
--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