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

Re: [RFC] Run hooks with a cleaner environment

From
PSPaul Serice <paul@serice.net>
Date
Dec 7, 2005, 00:19 UTC
Message-ID
<43962AAE.4040704@serice.net>
In-Reply-To
<Pine.LNX.4.64.0512061716030.25300@iabervon.org>
> Currently, hooks/post-update is run in the environment that
> receive-pack is run. This means that there are a number of things
> that are unpredictable. I'd like to make it set things up in a more
> predictable and useful way.

I'd like to second this. I've been bitten by two of the three issues you've raised.

Show 5 quoted lines
> stdout and stdin are connected to send-pack, either by broken pipes
> (for local pushes) or an ignored socket (via ssh). stdin should
> probably be /dev/null, and stdout should be either a log file or
> /dev/null. stderr is still the push's stderr, which may or may not
> be desired.

If there is a controlling terminal and nothing else git-related is reading from it, I'd like for stdout and stderr to be reconnected.

Paul Serice
Previous: Daniel BarkalowNext: Junio C Hamano
Message 2 of 5 in “[RFC] Run hooks with a cleaner environment”
  1. Daniel BarkalowDec 6, 2005
  2. Paul SericeDec 7, 2005
  3. Junio C HamanoDec 7, 2005
  4. Daniel BarkalowDec 7, 2005
  5. Junio C HamanoDec 7, 2005

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.