Re: [BUG/RFC] Git Gui: GIT_DIR leaks to spawned Git Bash
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 17, 2017, 10:52 UTC
- Message-ID
- <alpine.DEB.2.20.1701171145050.3469@virtualbox>
- In-Reply-To
- <20170116224022.GA8539@jessie.local>
Hi Max,
On Tue, 17 Jan 2017, Max Kirillov wrote:
> Apparently various GIT_* environment variables (most > interesting is GIT_DIR but AFAIR there were more) leak to > shell session launched from Git Gui's "Git Bash" menu item.
Given that you call it from Git GUI, i.e. for a *specific* worktree, I do not think that this bug is *all* that critical. After all, you won't even notice unless you use the very same Git Bash to navigate to a *different* worktree.
Having said that, if you have the time and energy to come up with a patch, I will definitely try my best to help you get it integrated.
And having said *that*, I have to admit that I was unable to reproduce: GIT_DIR was set neither when starting Git GUI from the Start Menu (and then navigating to a previously-opened worktree because I am too lazy to navigate manually), nor when starting Git GUI from a Git CMD in a worktree via `git gui`. In both cases, the environment contained only the following variables whose name starts with "GIT_": $GIT_ASKPASS, $GIT_ASK_YESNO and $GIT_EXEC_PATH.
I tested with Git for Windows v2.11.0(3), the latest offical version.
Thanks, Johannes