git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 0/2] Fix two hook conversion regressions

From
Adrian Ratiu <adrian.ratiu@collabora.com>
Date
Jan 14, 2026, 18:57 UTC
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 <chrisd@apache.org>
         Suggested-by: brian m. carlson <sandals@crustytoothpaste.net>
         Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
    @@ 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
Previous: Kristoffer HaugsbakkNext: Adrian Ratiu
Message 19 of 30 in “hook: make stdout_to_stderr optional”
  1. hook: make stdout_to_stderr optionalAdrian Ratiu, Jan 13, 2026
  2. Patrick SteinhardtJan 13, 2026
  3. Adrian RatiuJan 13, 2026
  4. Junio C HamanoJan 13, 2026
  5. Junio C HamanoJan 13, 2026
  6. Adrian RatiuJan 13, 2026
  7. Junio C HamanoJan 13, 2026
  8. Adrian RatiuJan 13, 2026
  9. Adrian RatiuJan 13, 2026
  10. hook: allow hooks to disable stdout_to_stderrAdrian Ratiu, Jan 13, 2026
  11. Jeff KingJan 14, 2026
  12. Adrian RatiuJan 14, 2026
  13. Adrian RatiuJan 14, 2026
  14. Kristoffer HaugsbakkJan 14, 2026
  15. Jeff KingJan 14, 2026
  16. Jeff KingJan 14, 2026
  17. Adrian RatiuJan 14, 2026
  18. Kristoffer HaugsbakkJan 14, 2026
  19. 0/2 Fix two hook conversion regressionsAdrian Ratiu, Jan 14, 2026
  20. 2/2 hook: make ungroup opt-out instead of opt-inAdrian Ratiu, Jan 14, 2026
  21. Jeff KingJan 14, 2026
  22. Adrian RatiuJan 14, 2026
  23. Kristoffer HaugsbakkJan 18, 2026
  24. 1/2 hook: allow hooks to disable stdout_to_stderrAdrian Ratiu, Jan 14, 2026
  25. Junio C HamanoJan 15, 2026
  26. Adrian RatiuJan 15, 2026
  27. Junio C HamanoJan 15, 2026
  28. Adrian RatiuJan 15, 2026
  29. Junio C HamanoJan 15, 2026
  30. Adrian RatiuJan 15, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.