All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Wesley Schwengle <wesleys@opperschaap.net>,
	 Git maillinglist <git@vger.kernel.org>
Subject: Re: git hook question
Date: Mon, 01 Jun 2026 14:33:13 +0900	[thread overview]
Message-ID: <xmqqcxyaakpy.fsf@gitster.g> (raw)
In-Reply-To: <20260529052141.GA1099450@coredump.intra.peff.net> (Jeff King's message of "Fri, 29 May 2026 01:21:41 -0400")

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).

  parent reply	other threads:[~2026-06-01  5:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29  5:01 git hook question Wesley Schwengle
2026-05-29  5:21 ` Jeff King
2026-05-29 16:11   ` Wesley Schwengle
2026-05-29 16:22     ` Wesley
2026-05-29 17:52     ` Ben Knoble
2026-05-29 19:23     ` Jeff King
     [not found]       ` <4d938e1e-fdd3-42d6-a879-4d394ee8c00d@opperschaap.net>
2026-05-29 21:00         ` Jeff King
2026-06-03 13:07           ` Adrian Ratiu
2026-06-01  5:33   ` Junio C Hamano [this message]
2026-06-01  5:55     ` Jeff King

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=xmqqcxyaakpy.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=wesleys@opperschaap.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.