Merge branch 'ar/run-command-hook' into next

Use hook API to replace ad-hoc invocation of hook scripts with the
run_command() API.

* ar/run-command-hook:
  receive-pack: convert receive hooks to hook API
  receive-pack: convert update hooks to new API
  hooks: allow callers to capture output
  run-command: allow capturing of collated output
  hook: allow overriding the ungroup option
  reference-transaction: use hook API instead of run-command
  transport: convert pre-push to hook API
  hook: convert 'post-rewrite' hook in sequencer.c to hook API
  hook: provide stdin via callback
  run-command: add stdin callback for parallelization
  run-command: add first helper for pp child states
This commit is contained in:
Junio C Hamano
2025-12-28 18:15:28 +09:00
12 changed files with 596 additions and 305 deletions

View File

@@ -1978,6 +1978,9 @@ int run_commit_hook(int editor_is_used, const char *index_file,
strvec_push(&opt.args, arg);
va_end(args);
/* All commit hook use-cases require ungrouping child output. */
opt.ungroup = 1;
opt.invoked_hook = invoked_hook;
return run_hooks_opt(the_repository, name, &opt);
}