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 19:00:27 -0400

On 5/22/26 4:46 AM, Johannes Sixt wrote:
> Am 20.05.26 um 22:24 schrieb Mark Levedahl:

> 
> 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.
> 
>> This is true even when running the repository
>> picker: that option provides a list of prior selections, and does no
>> validation on the list beyond checking that the directories exist.  For
>> now, just initialize _prefix along with other global variables.
>>

> 
> You cannot leave the _prefix empty, because it breaks `git gui browser
> master dir` when invoked from a subdirectory of the working tree.
> 
> This line must remain. I see that you add it back in later patch. There
> may be some motivation to move prefix discovery, but there is no
> motivation to remove it at this point.

Never mind, I confused myself on the process. THis patch has only affected repo discovery,
worktree discovery is later so should be left untouched here.

Mark