git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joey Hess <joey@kitenet.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Lars Wirzenius <liw@liw.fi>
Subject: Re: hooks that do not consume stdin sometimes crash git with SIGPIPE
Date: Mon, 5 Dec 2011 23:11:28 -0400	[thread overview]
Message-ID: <20111206031128.GB25805@gnu.kitenet.net> (raw)
In-Reply-To: <7vmxb6iim0.fsf@alter.siamese.dyndns.org>

[-- Attachment #1: Type: text/plain, Size: 737 bytes --]

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

      reply	other threads:[~2011-12-06  3:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 20:31 [PATCH] do not require filters to consume stdin Joey Hess
2011-08-29 22:53 ` Junio C Hamano
2011-08-30  1:20   ` Joey Hess
2011-12-05 19:29 ` hooks that do not consume stdin sometimes crash git with SIGPIPE Joey Hess
2011-12-05 21:43   ` Jeff King
2011-12-06  1:39   ` Junio C Hamano
2011-12-06  3:11     ` Joey Hess [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111206031128.GB25805@gnu.kitenet.net \
    --to=joey@kitenet.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=liw@liw.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).