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

Re: Running commands in wrong environment

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 4, 2009, 17:16 UTC
Message-ID
<7vr5raslqa.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20091204104441.GD27495@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> But the consequences, as you mention, could include data loss, which
> argues for being on the safe side. In that case, we would probably want
> an "xsetenv" to die() if we fail to avoid cluttering the code
> everywhere.
>
> I dunno. If we're going to do it, it is probably maint-worthy. Junio?

My gut feeling is xsetenv/xputenv would be sufficient. I do not think we make any setenv/putenv that we do not care about failing, perhaps other than the "if LESS is not there set it to this default value, as it would give users nicer experience if they use 'less'."

Previous: Jeff KingNext: Jeff King
Message 3 of 4 in “Running commands in wrong environment”
  1. Marinescu Paul danDec 3, 2009
  2. Jeff KingDec 4, 2009
  3. Junio C HamanoDec 4, 2009
  4. Jeff KingDec 6, 2009

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.