diff options
| author | Adrian Ratiu <adrian.ratiu@collabora.com> | 2026-03-25 21:55:02 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-25 14:00:47 -0700 |
| commit | e17bd99281ae01a758d717bdfaa759bbeefb6149 (patch) | |
| tree | a3d9a8c28b5d133eafd6038f2b099138f984cff5 /Documentation/git-hook.adoc | |
| parent | b66efad2b1f53755a80699dc39f94e2b15d6af67 (diff) | |
| download | git-e17bd99281ae01a758d717bdfaa759bbeefb6149.tar.xz | |
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 as tab-separated columns,
with the status as a prefix before the name (like scope with
--show-scope). With --show-scope it looks like:
$ git hook list --show-scope pre-commit
global linter
local disabled no-leaks
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>
Diffstat (limited to 'Documentation/git-hook.adoc')
0 files changed, 0 insertions, 0 deletions
