From: Johannes Sixt Date: Tue, 19 May 2026 21:15:57 GMT Subject: Re: [PATCH v1 11/11] git-gui: add gui and pick as explicit subcommands Message-ID: <246039f4-8f61-4f7c-bd8a-50b7f519e7ae@kdbg.org> In-Reply-To: Am 19.05.26 um 20:45 schrieb Mark Levedahl: > What I have now is > > if (enabled gitdir discovery) { >     discover gitdir >     maybe an error occurs and gitdir remains {} > } > > if (enabled pick && gitdir eq {}) { >     unset GIT_DIR .. (just to be friendly, could throw an error instead...) >     pick >     discover gitdir to VALIDATE pick gave us a good thing > } > > if no gitdir { >     error No Repository > } > > then on to worktree discovery (which also validates what pick returns as pick may not have > done so). Sounds good. -- Hannes