]> git.ipfire.org Git - thirdparty/git.git/commit
hook: allow overriding the ungroup option
authorAdrian Ratiu <adrian.ratiu@collabora.com>
Fri, 26 Dec 2025 12:23:30 +0000 (14:23 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Jan 2026 21:10:29 +0000 (13:10 -0800)
commite2ffb1ff043e0f8bd888f07a386e48b8fe9a9779
treeb986ec3e274d1e79708c4210cfe55a1729e8a77b
parentbb98a78a5f1e35be109bbdb51c67ad6f7805c178
hook: allow overriding the ungroup option

When calling run_process_parallel() in run_hooks_opt(), the
ungroup option is currently hardcoded to .ungroup = 1.

This causes problems when ungrouping should be disabled, for
example when sideband-reading collated output from child hooks,
because sideband-reading and ungrouping are mutually exclusive.

Thus a new hook.h option is added to allow overriding.

The existing ungroup=1 behavior is preserved in the run_hooks()
API and the "hook run" command. We could modify these to take
an option if necessary, so I added two code comments there.

Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/hook.c
commit.c
hook.c
hook.h