git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Max KirillovNext: Max Kirillov
Message 2 of 4 in “[BUG/RFC] Git Gui: GIT_DIR leaks to spawned Git Bash”
  1. Max KirillovJan 16, 2017
  2. Johannes SchindelinJan 17, 2017
  3. Max KirillovJan 17, 2017
  4. Johannes SchindelinJan 18, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.