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