Subject: Re: [PATCH v2 03/10] hook: convert 'post-rewrite' hook in sequencer.c to hook API

From: Patrick Steinhardt <[email-masked]>
Date: Tue, 21 Oct 2025 09:41:07 +0200

On Fri, Oct 17, 2025 at 05:15:37PM +0300, Adrian Ratiu wrote:
> 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