From: Jonathan Nieder Date: Wed, 21 Jun 2017 17:57:40 GMT Subject: Re: [PATCH v3 11/20] path: construct correct path to a worktree's index Message-ID: <20170621175740.GE60603@aiede.mtv.corp.google.com> In-Reply-To: <20170621154330.GA53348@google.com> Brandon Williams wrote: > So your suggestion is to completely avoid doing any location when asking > for a worktree_git_path, I guess those code paths which request those > paths should be aware enough that if they need something in commondir to > use git_common_path instead. My only worry is that it may be difficult > to catch misuse of worktree_git_path during code review, at least that > was one of the motivating factors for originally respecting > GIT_INDEX_FILE and the like. Correct: I'm saying that when someone calls worktree_git_path, the intent is to resolve a path within the worktree git directory. File relocation just gets in the way of that. I am not too worried about misuse because the only reason to call worktree_git_path is to access a worktree-specific file like HEAD or index. Thanks, Jonathan