Re: [PATCH v2 01/11] git-gui: guard set/unset of GIT_DIR and GIT_WORK_TREE
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- May 23, 2026, 08:18 UTC
- Message-ID
- <b332c7d9-c86b-4d4b-a873-1600d910a237@kdbg.org>
- In-Reply-To
- <eb748327-6652-4477-82bb-9db9f8388ec0@gmail.com>
Am 22.05.26 um 13:54 schrieb Mark Levedahl:
Show 7 quoted lines
> The manual page is incomplete: if the repository has set core.worktree=/somehere, that is > the root of the worktree and the current directory is always ignored. git rev-parse will > report /somewhere as the answer to --show-toplevel regardless of current directory, even > if inside the gitdir, and even if GIT_DIR is used. > > The user can override with GIT_WORK_TREE, and if so we must keep GIT_WORK_TREE in the > environment if it was set. [...]
Oh, well, these intricacies! Let's scrap my patch and keep yours.
The other patch that removes cd $_gitworktree from do_gitk should still be good, I think.
-- Hannes