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

Running commands in wrong environment

From
MDMarinescu Paul dan <pauldan.marinescu@epfl.ch>
Date
Dec 3, 2009, 19:19 UTC
Message-ID
<D6F784B72498304C93A8A4691967698E8EE2C44FE5@REX2.intranet.epfl.ch>
git's start_command (run_command.c) executes a command (e.g. hook) but does not verify that it has properly set up the environment. It seems that in the unlikely case where putenv (run_command.c:117) fails, the command may have undesirable effects e.g. GIT_INDEX_FILE should have been set (interactive pre-commit hooks) but the default index will be used instead. It would be safer not to run the command but just exit in that case.
Next: Jeff King
Message 1 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.