]> git.ipfire.org Git - thirdparty/git.git/commit
hook: run a list of hooks to prepare for multihook support
authorEmily Shaffer <emilyshaffer@google.com>
Wed, 18 Feb 2026 22:23:46 +0000 (00:23 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 19 Feb 2026 21:23:40 +0000 (13:23 -0800)
commit4a36cb4c9f0f508db2e5dda75673e0d4b1242007
tree5efcdc91c22605dfca10ff6005d0eb341d5fd30a
parentee2fbfd6b28fba20bc936ad1c2cb2617ba251025
hook: run a list of hooks to prepare for multihook support

Hooks are limited to run one command (the default from the hookdir) for
each event. This limitation makes it impossible to run multiple commands
via config files, which the next commits will add.

Implement the ability to run a list of hooks in hook.[ch]. For now, the
list contains only one entry representing the "default" hook from the
hookdir, so there is no user-visible change in this commit.

All hook commands still run sequentially like before. A separate patch
series will enable running them in parallel.

Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
hook.c
hook.h