From: Junio C Hamano Date: Thu, 19 Feb 2026 20:37:31 GMT Subject: Re: [PATCH v2 1/2] wt-status: avoid passing NULL worktree Message-ID: In-Reply-To: Junio C Hamano writes: > In other words, the function is_current_worktree(wt) may not take a > repository and always compute things relative to the_repository, but > once we wean ourselves off of the_repository, we would/should have > repo_is_current_worktree(repo, wt), making is_current_worktree(wt) a > thin wrapper for repo_is_current_worktree(the_repository, wt)? Eh, in light of 2/2 of this series, since wt knows which repository it belongs to, what I wrote above does not make much sense. Allowing callers to give repo that is different from wt->repo to that function is a potential foot-gun. In other words, isn't is_current_worktree(wt) using the_worktree and not wt->repo a bug already, I have to wonder?