]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ar/config-hooks'
authorJunio C Hamano <gitster@pobox.com>
Tue, 10 Mar 2026 21:23:18 +0000 (14:23 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Mar 2026 21:23:18 +0000 (14:23 -0700)
Allow hook commands to be defined (possibly centrally) in the
configuration files, and run multiple of them for the same hook
event.

* ar/config-hooks:
  hook: add -z option to "git hook list"
  hook: allow out-of-repo 'git hook' invocations
  hook: allow event = "" to overwrite previous values
  hook: allow disabling config hooks
  hook: include hooks from the config
  hook: add "git hook list" command
  hook: run a list of hooks to prepare for multihook support
  hook: add internal state alloc/free callbacks

1  2 
builtin/receive-pack.c
git.c
refs.c
repository.c
repository.h
transport.c

Simple merge
diff --cc git.c
index 744cb6527e065e262989d9cd464b476e084e008a,a9e462ee3228f944d9a7e820bd5aa39e45cc6ae6..6480ff8373d7e668e6388474b5c87ef1c94ba08d
--- 1/git.c
--- 2/git.c
+++ b/git.c
@@@ -586,8 -586,7 +586,8 @@@ static struct cmd_struct commands[] = 
        { "grep", cmd_grep, RUN_SETUP_GENTLY },
        { "hash-object", cmd_hash_object },
        { "help", cmd_help },
-       { "hook", cmd_hook, RUN_SETUP },
 +      { "history", cmd_history, RUN_SETUP },
+       { "hook", cmd_hook, RUN_SETUP_GENTLY },
        { "index-pack", cmd_index_pack, RUN_SETUP_GENTLY | NO_PARSEOPT },
        { "init", cmd_init_db },
        { "init-db", cmd_init_db },
diff --cc refs.c
Simple merge
diff --cc repository.c
Simple merge
diff --cc repository.h
Simple merge
diff --cc transport.c
Simple merge