diff options
| author | Emily Shaffer <emilyshaffer@google.com> | 2026-02-19 00:23:47 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-19 13:23:41 -0800 |
| commit | 9fdaa6788924d4bb5ffc3a5908dae8a50e072f77 (patch) | |
| tree | 326b5d2e0fc66a44080600b9f93c17f71ca3d778 /Documentation | |
| parent | 4a36cb4c9f0f508db2e5dda75673e0d4b1242007 (diff) | |
| download | git-9fdaa6788924d4bb5ffc3a5908dae8a50e072f77.tar.xz | |
hook: add "git hook list" command
The previous commit introduced an ability to run multiple commands for
hook events and next commit will introduce the ability to define hooks
from configs, in addition to the "traditional" hooks from the hookdir.
Introduce a new command "git hook list" to make inspecting hooks easier
both for users and for the tests we will add.
Further commits will expand on this, e.g. by adding a -z output mode.
Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/git-hook.adoc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/git-hook.adoc b/Documentation/git-hook.adoc index f6cc72d2ca..eb0ffcb8a9 100644 --- a/Documentation/git-hook.adoc +++ b/Documentation/git-hook.adoc @@ -9,6 +9,7 @@ SYNOPSIS -------- [verse] 'git hook' run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-args>] +'git hook' list <hook-name> DESCRIPTION ----------- @@ -28,6 +29,10 @@ Any positional arguments to the hook should be passed after a mandatory `--` (or `--end-of-options`, see linkgit:gitcli[7]). See linkgit:githooks[5] for arguments hooks might expect (if any). +list:: + Print a list of hooks which will be run on `<hook-name>` event. If no + hooks are configured for that event, print a warning and return 1. + OPTIONS ------- |
