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

Re: hooks that do not consume stdin sometimes crash git with SIGPIPE

From
Joey Hess <joey@kitenet.net>
Date
Dec 6, 2011, 03:11 UTC
Message-ID
<20111206031128.GB25805@gnu.kitenet.net>
In-Reply-To
<7vmxb6iim0.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Why do you have a hook that is expected to read from receive-pack that
> does _not_ read anything from it in the first place? If you do not care
> about the update status given to pre-receive, shouldn't you be using the
> update hook and ignoring the command line parameters instead?

My hook *does* consume the stdin in one case, but in another case it does no checks and so can immediately exit.

Also, I didn't want it to be run once per updated ref as the update hook is, since the tests it performs are rather expensive -- loading a perl wiki engine in order to check that the changeset contains only changes to wiki pages that are allowed based on the wiki's configuration.

-- 
see shy jo
Previous: Junio C Hamano
Message 7 of 7 in “do not require filters to consume stdin”
  1. do not require filters to consume stdinJoey Hess, Aug 29, 2011
  2. Junio C HamanoAug 29, 2011
  3. Joey HessAug 30, 2011
  4. hooks that do not consume stdin sometimes crash git with SIGPIPEJoey Hess, Dec 5, 2011
  5. Jeff KingDec 5, 2011
  6. Junio C HamanoDec 6, 2011
  7. Joey HessDec 6, 2011

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.