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

Re: bug? subprocesses can use wrong Git if $PATH is unset

From
PRPriedhorsky, Reid <reidpr@lanl.gov>
Date
Jun 7, 2023, 17:43 UTC
Message-ID
<52BEE66B-934F-449F-A9BA-75B61A64A989@lanl.gov>
In-Reply-To
<xmqqwn0l72bg.fsf@gitster.g>
Show 22 quoted lines
> On Jun 2, 2023, at 7:38 PM, Junio C Hamano <gitster@pobox.com> wrote:
> 
> "brian m. carlson" <sandals@crustytoothpaste.net> writes:
> 
>> On 2023-06-02 at 16:14:47, Priedhorsky, Reid wrote:
>>> Hello Brian,
>>> 
>>> I do wonder if the behavior would be worth documenting, e.g. at
>>> https://urldefense.com/v3/__https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables__;!!Bt8fGhp8LhKGRg!CTLDK9n1pGJTODDrapV9r_JrypUCk5A_v4w7bz6GgCTz8_sg91kpz2ID1NRptCjG2bUMiJ6ftC-PlM4$ ,
>>> where Git’s relationship to $HOME is also documented. I would be happy
>>> to submit a pull request.
>> 
>> I don't think it's necessary, since it's expected behaviour for me, but
>> I am not the only person on this list, and perhaps others would
>> appreciate a patch.
> 
> I tend to agree that it is an expected behaviour.  In addition,
> unsetting PATH is not something people deliberately do every day
> without understanding its implications, so I would rather not see us
> add "if you do this esteric thing, this would happen" for them.
> 
> Thanks.
Thank you; that sounds like a consensus.
To be clear though, we didn’t unset $PATH on purpose. We found unexpected behavior and tracked it down to a bug that cleared the environment, including $PATH.

Thanks, Reid

— he/his

Previous: Junio C Hamano
Message 6 of 6 in “bug? subprocesses can use wrong Git if $PATH is unset”
  1. Priedhorsky, ReidJun 1, 2023
  2. brian m. carlsonJun 2, 2023
  3. Priedhorsky, ReidJun 2, 2023
  4. brian m. carlsonJun 2, 2023
  5. Junio C HamanoJun 3, 2023
  6. Priedhorsky, ReidJun 7, 2023

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.