Re: [BUG/RFC] Git Gui: GIT_DIR leaks to spawned Git Bash
- From
Max Kirillov <max@max630.net>
- Date
- Jan 17, 2017, 18:42 UTC
- Message-ID
- <20170117184224.GA23841@jessie.local>
- In-Reply-To
- <alpine.DEB.2.20.1701171145050.3469@virtualbox>
On Tue, Jan 17, 2017 at 11:52:29AM +0100, Johannes Schindelin wrote:
Show 7 quoted lines
> 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.
...
> After all, you won't even notice unless you use the very > same Git Bash to navigate to a *different* worktree.
That's right, I haven't been noticing it myself for quite a time. But once I decided to tweak my habits to having only one terminal window opened, and immediately noticed.
> And having said *that*, I have to admit that I was unable to reproduce
I have found exact way to reproduce it and actually the reason. Turns out to be obvious mistake in code. PR is in github: https://github.com/git-for-windows/git/pull/1032
-- Max