Subject: Re: [PATCH v2 04/11] git-gui: use rev-parse exclusively to find a repository

From: Mark Levedahl <[email-masked]>
Date: Fri, 22 May 2026 08:04:49 -0400

On 5/22/26 4:46 AM, Johannes Sixt wrote:
> Sorry, but I cannot agree with "prefix is only known after the worktree
> is found". The prefix is a property that can be known even if we haven't
> asked where the top-level of the working tree is. See more below.
Rewording is necessary, but:
This patch already adds
set _prefix {}
to the globals init block.

_prefix can only be non-empty if normal gitdir / gitworktree discovery (without GIT_DIR)
runs and finds the current directory is a descendent of the worktree root. That step comes
later, even if the picker is run.

Mark