From a3d1f391d35762162356201028fb73774a6c4a8b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 15 Jan 2026 11:12:53 -0800 Subject: Revert "Merge branch 'ar/run-command-hook'" This reverts commit f406b8955295d01089ba2baf35eceadff2d11cae, reversing changes made to 1627809eeff75e6ec936fc609e7be46d5eb2fa9e. It seems to have caused a few regressions, two of the three known ones we have proposed solutions for. Let's give ourselves a bit more room to maneuver during the pre-release freeze period and restart once the 2.53 ships. --- hook.h | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) (limited to 'hook.h') diff --git a/hook.h b/hook.h index ae502178b9..11863fa734 100644 --- a/hook.h +++ b/hook.h @@ -1,7 +1,6 @@ #ifndef HOOK_H #define HOOK_H #include "strvec.h" -#include "run-command.h" struct repository; @@ -34,60 +33,10 @@ struct run_hooks_opt */ int *invoked_hook; - /** - * Allow hooks to set run_processes_parallel() 'ungroup' behavior. - */ - unsigned int ungroup:1; - /** * 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`. - * - */ - feed_pipe_fn feed_pipe; - - /** - * Opaque data pointer used to pass context to `feed_pipe_fn`. - * - * It can be accessed via the second callback arg 'pp_cb': - * ((struct hook_cb_data *) pp_cb)->hook_cb->options->feed_pipe_ctx; - * - * The caller is responsible for managing the memory for this data. - * Only useful when using `run_hooks_opt.feed_pipe`, otherwise ignore it. - */ - void *feed_pipe_ctx; - - /** - * Opaque data pointer used to keep internal state across callback calls. - * - * It can be accessed directly via the third callback arg 'pp_task_cb': - * struct ... *state = pp_task_cb; - * - * The caller is responsible for managing the memory for this data. - * Only useful when using `run_hooks_opt.feed_pipe`, otherwise ignore it. - */ - void *feed_pipe_cb_data; - - /* - * Populate this to capture output and prevent it from being printed to - * stderr. This will be passed directly through to - * run_command:run_parallel_processes(). See t/helper/test-run-command.c - * for an example. - */ - consume_output_fn consume_output; }; #define RUN_HOOKS_OPT_INIT { \ -- cgit v1.3