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

Re: [PATCH] rebase: exec leaks GIT_DIR to environment

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 30, 2017, 02:26 UTC
Message-ID
<xmqq1sll8j6f.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<4150d979-f653-e79b-563a-1dc43f12468d@talktalk.net>
Phillip Wood <phillip.wood@talktalk.net> writes:
Show 21 quoted lines
> Just clearing GIT_DIR does not match the behavior of the shell version
> (tested by passing -p to avoid rebase--helper) as that passes GIT_DIR to
> exec commands if it has been explicitly set. I think that users that set
> GIT_DIR on the command line would expect it to be propagated to exec
> commands.
>
> $ git rebase -px'echo $GIT_DIR' @
>
>                                                             Merge commit
> '7c2f1abd64' into phil
> Executing: echo $GIT_DIR
>
> Successfully rebased and updated refs/heads/phil.
>
> $ env GIT_DIR=.git git rebase -px'echo $GIT_DIR' @
>
>                                                             Merge commit
> '7c2f1abd64' into phil
> Executing: echo $GIT_DIR
> /home/phil/Documents/src/git/.git/worktrees/git-next
> Successfully rebased and updated refs/heads/phil.

Hmmm, I do not mess with GIT_DIR at all in my workflow, so I am having a bit of hard time judging if this regression is serious enough to be a release blocker.

I'd prefer to avoid reverting the whole js/rebase-i-final topic from 'master' this late in the game, even though I do not expect we would see the remainder of the system gets broken due to hidden dependency on the topic, because the changes on the topic are relatively well isolated.

570676e011 d1114d87c7 2f0e14e649 5f3108b7b6

Previous: Phillip WoodNext: Jacob Keller
Message 5 of 12 in “rebase: exec leaks GIT_DIR to environment”
  1. rebase: exec leaks GIT_DIR to environmentJacob Keller, Oct 28, 2017
  2. Johannes SchindelinOct 28, 2017
  3. Jacob KellerOct 28, 2017
  4. Phillip WoodOct 29, 2017
  5. Junio C HamanoOct 30, 2017
  6. Jacob KellerOct 30, 2017
  7. Junio C HamanoOct 30, 2017
  8. Jacob KellerOct 30, 2017
  9. Phillip WoodOct 30, 2017
  10. Johannes SchindelinOct 30, 2017
  11. Jacob KellerOct 31, 2017
  12. Jacob KellerOct 30, 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.