From: Junio C Hamano Date: Tue, 07 Jul 2026 19:23:49 GMT Subject: Re: [PATCH v6 2/2] config: add "worktree" and "worktree/i" includeIf conditions Message-ID: In-Reply-To: Patrick Steinhardt 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.