Re: [PATCH v6 2/2] config: add "worktree" and "worktree/i" includeIf conditions
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 7, 2026, 19:23 UTC
- Message-ID
- <xmqqfr1u38oq.fsf@gitster.g>
- In-Reply-To
- <ak0am-pEdtOvyBp4@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 18 quoted lines
>> > 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.