Files
git/builtin
Adrian Ratiu 86a30747ae hook: show disabled hooks in "git hook list"
Disabled hooks were filtered out of the cache entirely, making them
invisible to "git hook list". Keep them in the cache with a new
"disabled" flag which is propagated to the respective struct hook.

"git hook list" now shows disabled hooks annotated with "(disabled)"
in the config order. With --show-scope, it looks like:

$ git hook list --show-scope pre-commit
linter (global)
no-leaks (local, disabled)
hook from hookdir

A disabled hook without a command issues a warning instead of the
fatal "hook.X.command must be configured" error. We could also throw
an error, however it seemd a bit excessive to me in this case.

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>
2026-03-09 13:08:11 -07:00
..
2025-11-19 10:55:39 -08:00
2026-02-20 08:13:58 -08:00
2024-12-13 07:33:36 -08:00
2025-07-23 08:15:18 -07:00
2025-09-29 11:40:35 -07:00
2025-07-23 08:15:18 -07:00
2026-02-20 08:13:58 -08:00
2026-02-23 13:23:41 -08:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-07-01 14:46:38 -07:00
2026-03-04 10:53:02 -08:00
2025-08-22 13:13:20 -07:00
2024-12-18 10:44:31 -08:00
2025-07-16 22:16:15 -07:00
2025-12-25 08:29:27 +09:00
2025-08-21 13:47:00 -07:00
2026-03-09 13:08:10 -07:00
2025-10-02 12:26:12 -07:00
2025-07-23 08:15:18 -07:00
2025-11-19 10:55:39 -08:00
2026-02-20 08:13:58 -08:00
2025-07-23 08:15:18 -07:00
2025-09-16 11:37:06 -07:00
2025-08-21 13:46:59 -07:00