aboutsummaryrefslogtreecommitdiff
path: root/string-list.h
diff options
context:
space:
mode:
authorAdrian Ratiu <adrian.ratiu@collabora.com>2026-03-25 21:55:03 +0200
committerJunio C Hamano <gitster@pobox.com>2026-03-25 14:00:48 -0700
commit5c58dbc887a1f3530cb29c995f63675beebb22e9 (patch)
tree1db89b9b9a4ef3f852b228f62c11c813174c2336 /string-list.h
parente17bd99281ae01a758d717bdfaa759bbeefb6149 (diff)
downloadgit-5c58dbc887a1f3530cb29c995f63675beebb22e9.tar.xz
hook: reject unknown hook names in git-hook(1)
Teach "git hook run" and "git hook list" to reject hook event names that are not recognized by Git. This helps catch typos such as "prereceive" when "pre-receive" was intended, since in 99% of the cases users want known (already-existing) hook names. The list of known hooks is derived from the generated hook-list.h (built from Documentation/githooks.adoc). This is why the Makefile is updated, so builtin/hook.c depends on hook-list.h. In meson the header is already a dependency for all builtins, no change required. The "--allow-unknown-hook-name" flag can be used to bypass this check. Suggested-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'string-list.h')
0 files changed, 0 insertions, 0 deletions