Re: git hook question
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 1, 2026, 05:33 UTC
- Message-ID
- <xmqqcxyaakpy.fsf@gitster.g>
- In-Reply-To
- <20260529052141.GA1099450@coredump.intra.peff.net>
Jeff King <peff@peff.net> 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.
And unlike command line arguments, there is no handy way to say "I do not care what the input is" (other than putting "cat >/dev/null;" in front of what you really want to do, that is).