Re: [PATCH v2 04/11] git-gui: use rev-parse exclusively to find a repository
- From
Mark Levedahl <mlevedahl@gmail.com>
- Date
- May 22, 2026, 12:04 UTC
- Message-ID
- <f54ea491-4165-43fa-b1ac-14d0fe63fc75@gmail.com>
- In-Reply-To
- <8d1488ec-c4de-4ddd-b3cd-e1e8b4a343bf@kdbg.org>
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