From: Adrian Ratiu Date: Wed, 14 Jan 2026 18:57:29 GMT Subject: [PATCH v3 0/2] Fix two hook conversion regressions Message-ID: <20260114185731.2381550-1-adrian.ratiu@collabora.com> In-Reply-To: <20260113115633.230479-1-adrian.ratiu@collabora.com> Hello everyone, This series fixes 2 regressions reported by Chris and Kristoffer, introduced by the 'ar/run-command-hook' merge into master. Based on a discussion with Peff on v2, I do plan to revisit and rework the server-side hook I/O polling & batching logic, however that will be a separate patch unrelated to these two regressions. Many thanks to everyone who helped debug & fix these! This series is based on the master branch. Pushed to GitHub: https://github.com/10ne1/git/tree/dev/aratiu/make-hook-stdout_to_stderr-optional-v3 Successful CI run: https://github.com/10ne1/git/actions/runs/21004980299 Changes in v3: * New commit to make hook opts.ungroup = 1 default (Peff) * Dropped the ungroup fix from the first commit because it's now handled by the more comprehensive second commit (Peff, Adrian) * Added fixes tags to commits (Adrian) Range-diff between v2 -> v3: 1: 898a21ddd0 ! 1: 77db7035c5 hook: allow hooks to disable stdout_to_stderr @@ Commit message and will continue to work after we eventually introduce parallel hook execution and config-based hooks. + Fixes: 3e2836a742d8 ("transport: convert pre-push to hook API") Reported-by: Chris Darroch Suggested-by: brian m. carlson Signed-off-by: Adrian Ratiu @@ transport.c: static int run_pre_push_hook(struct transport *transport, + /* + * pre-push hooks expect stdout & stderr to be separate, so don't merge + * them to keep backwards compatibility with existing hooks. -+ * run_process_parallel(), called via run_hooks_opt() below, will buffer -+ * and merge the streams when output is grouped, so also set ungroup = 1. + */ + opt.stdout_to_stderr = 0; -+ opt.ungroup = 1; + ret = run_hooks_opt(the_repository, "pre-push", &opt); -: ---------- > 2: de3001f063 hook: make ungroup opt-out instead of opt-in Adrian Ratiu (2): hook: allow hooks to disable stdout_to_stderr hook: make ungroup opt-out instead of opt-in builtin/hook.c | 6 -- builtin/receive-pack.c | 12 ++- commit.c | 3 - hook.c | 5 +- hook.h | 7 ++ t/t1800-hook.sh | 176 +++++++++++++++++++++++++++++++++++++++++ transport.c | 6 ++ 7 files changed, 199 insertions(+), 16 deletions(-) -- 2.52.0.732.gb351b5166d.dirty