Re: [PATCH v2 03/10] hook: convert 'post-rewrite' hook in sequencer.c to hook API
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Oct 21, 2025, 07:41 UTC
- Message-ID
- <aPc5EzFRrDuI-0XH@pks.im>
- In-Reply-To
- <20251017141544.1538542-4-adrian.ratiu@collabora.com>
On Fri, Oct 17, 2025 at 05:15:37PM +0300, Adrian Ratiu wrote:
Show 12 quoted lines
> diff --git a/sequencer.c b/sequencer.c
> index 5476d39ba9..71ed31c774 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -1292,32 +1292,40 @@ int update_head_with_reflog(const struct commit *old_head,
> return ret;
> }
>
> +static int pipe_from_strbuf(int hook_stdin_fd, void *pp_cb, void *pp_task_cb UNUSED)
> +{
> + struct hook_cb_data *hook_cb = pp_cb;
> + struct strbuf *to_pipe = hook_cb->options->feed_pipe_ctx;Not sure, but shouldn't it be possible to set `opt.feed_pipe_cb_data` instead and then access the context via `pp_task_cb` here instead of having to reach into the struct?
Patrick