Re: [PATCH v4 03/11] hook: provide stdin via callback
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Dec 16, 2025, 08:08 UTC
- Message-ID
- <aUETdm_-JnL78s8o@pks.im>
- In-Reply-To
- <20251204141535.1986263-4-adrian.ratiu@collabora.com>
On Thu, Dec 04, 2025 at 04:15:27PM +0200, Adrian Ratiu wrote:
Show 20 quoted lines
> diff --git a/hook.h b/hook.h > index 11863fa734..51cab785ea 100644 > --- a/hook.h > +++ b/hook.h > @@ -37,6 +38,43 @@ struct run_hooks_opt > * Path to file which should be piped to stdin for each hook. > */ > const char *path_to_stdin; > + > + /** > + * Callback used to incrementally feed a child hook stdin pipe. > + * > + * Useful especially if a hook consumes large quantities of data > + * (e.g. a list of all refs in a client push), so feeding it via > + * in-memory strings or slurping to/from files is inefficient. > + * While the callback allows piecemeal writing, it can also be > + * used for smaller inputs, where it gets called only once. > + * > + * Add hook callback initalization context to `feed_pipe_ctx`. > + * Add Hook callback internal state to `feed_pipe_cb_data`.
Tiniest nit just to prove that I'm somewhat paying attention: s/Hook/hook/. This definitely doesn't warrant a reroll.
Patrick