Skip to content

pr-2272/thomasbachem/hook-event-enabled-hookdir-v2

tagged this 23 Oct 13:19
Two small changes to hook configuration. With the first,
hook.pre-commit.enabled=false also stops the pre-commit hook in the hooks
directory. With the second, hook.*.enabled and hook.*.parallel can be given
without a value, which means true, as for any other boolean.

Changes since v1:

 * The documentation of hook.<event>.enabled now says that it covers
   configured hooks and the hook in the hooks directory alike. The subject
   and message of patch 1 present this as a change in behavior rather than a
   fix (Adrian, Junio).

 * The test that hook.<event>.enabled=false leaves the hooks of other events
   alone now has a hookdir hook too.

Thomas Bachem (2):
  hook: make hook.<event>.enabled cover the hookdir hook
  hook: accept .enabled and .parallel given without a value

 Documentation/config/hook.adoc |  3 +-
 builtin/hook.c                 |  6 ++--
 hook.c                         | 17 ++++++----
 hook.h                         |  8 ++++-
 t/t1800-hook.sh                | 57 ++++++++++++++++++++++++++++++++--
 5 files changed, 78 insertions(+), 13 deletions(-)

base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd

Submitted-As: https://lore.kernel.org/git/pull.2272.v2.git.1792761542.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.2272.git.1792520353.gitgitgadget@gmail.com
Assets 2
Loading