From: Jeff King Date: Mon, 01 Jun 2026 05:55:55 GMT Subject: Re: git hook question Message-ID: <20260601055555.GA16637@coredump.intra.peff.net> In-Reply-To: On Mon, Jun 01, 2026 at 02:33:13PM +0900, Junio C Hamano wrote: > Jeff King writes: > > > I don't think so; the command is expected to handle (or ignore) the > > arguments as appropriate. > > We should also caution that the command is expected to handle not > just the arguments but its standard input. Not reading any and > exiting may be a no-no for some hooks. Perhaps. I think we've tried to make Git resilient to hooks which do not read all of their input (by ignoring SIGPIPE). It may be a bug for a hook to ignore stdin, but depending on what the hook is trying to do, that information might or might not be relevant. I do think there is a gotcha for hooks that expect the stdin of their commands to be hooked up to a terminal to interact with the user. I certainly don't have any objection to calling more of this out in the docs, though. -Peff