From: Shroom Moo Date: Sat, 09 May 2026 09:55:37 GMT Subject: Re: [PATCH v6 3/3] git-gui: handle GIT_DIR and GIT_WORK_TREE early Message-ID: In-Reply-To: <20260509084846.1694-1-bootaina702@gmail.com> These are functional, yet somewhat complex. Only 1 and 2 are necessary in this adjustment, I suppose. Saving and restoring old values in do_gitk and do_git_gui actually does not require additional encapsulation because: - First, GIT_DIR always exists, and directly using set and catch {unset} is inherently safe. - Second, the set/unset operations for GIT_WORK_TREE are already properly encapsulated. Since the save-restore pattern only appears in these two places, introducing capture_git_env / restore_git_env adds more conceptual overhead than what it saves. Shroom