hook-list.h: add a generated list of hooks, like config-list.h
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 14 Jun 2021 10:33:19 +0000 (12:33 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Jun 2021 01:09:25 +0000 (10:09 +0900)
commitd4102becdcf3b3599bd552f457fe45d36db6dc8a
tree76b5f6a2cf7a5e84f30da3b3fdec43f70e0a79b1
parent85f5da56e34444f2eb21e125224ac4e095dab86f
hook-list.h: add a generated list of hooks, like config-list.h

Resolve a long-standing TODO item in bugreport.c of there being no
centralized listing of hooks, this fixes a bug with the bugreport
listing only knowing about 1/4 of the p4 hooks. It didn't know about
the "reference-transaction" hook either.

We can now make sure this is kept up-to-date, as the hook.c library
will die if asked to find a hook we don't know about yet. The only
(undocumented) exception is the artificial "test-hook" used in our own
test suite. Move some of the tests away from the "does-not-exist"
pseudo-hook, and test for the new behavior.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.gitignore
Makefile
builtin/bugreport.c
generate-hooklist.sh [new file with mode: 0755]
hook.c
t/t1800-hook.sh