From: Adrian Ratiu <adrian.ratiu@collabora.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Thomas Bachem via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Patrick Steinhardt <ps@pks.im>,
Emily Shaffer <nasamuffin@google.com>,
Thomas Bachem <mail@thomasbachem.com>
Subject: Re: [PATCH 1/2] hook: honor hook.<event>.enabled for the hookdir hook
Date: Thu, 22 Oct 2026 16:40:59 +0300 [thread overview]
Message-ID: <874ied3las.fsf@collabora.com> (raw)
In-Reply-To: <xmqqbj8nosq1.fsf@gitster.g>
On Wed, 21 Oct 2026, Junio C Hamano <gitster@pobox.com> wrote:
> Adrian Ratiu <adrian.ratiu@collabora.com> writes:
>> However, having said that, I don't have a strong opinion and am ok
>> either way, so if others think it's a good idea, we could accept this
>> patch instead of fixing the doc. :)
>
> I am undecided if we should treat it as a backward incompatible
> change or if we should just label this change as a "bugfix".
>
> The additional documentation in question said
>
> hook.<event>.enabled::
> Switch to enable or disable all hooks for the `<event>` hook event.
> When set to `false`, no hooks fire for that event, regardless of any
> per-hook `hook.<friendly-name>.enabled` settings. Defaults to `true`.
> See linkgit:git-hook[1].
>
> which talks about "hook.<friendly-name>.enabled" setting, hinting
> that this is also about the hooks that can be controlled by that
> other setting, which was added by 1ecce722cd (hook: allow disabling
> config hooks, 2026-02-19), which added "diable" specifically for
> "config hooks", and the documentation from that addition says:
>
> hook.<friendly-name>.enabled::
> Whether the hook `hook.<name>` is enabled. Defaults to `true`.
> Set to `false` to disable the hook without removing its
> configuration. This is particularly useful when a hook is defined
> in a system or global config file and needs to be disabled for a
> specific repository. See linkgit:git-hook[1].
>
> mentioning "removing its configuration", and "defined in ... config
> file", to me, it is very clear that this configuration variable is
> only about the hooks defined in the configuration system.
>
> Which tempts me to say that the change being discussed is a backward
> incompatible breakage, rather than a bugfix.
>
> But casual end-users would of course do not know how the feature
> evolved, and may not read the documentation of the feature they use
> carefully enough. So I dunno. Perhaps changing the behaviour at
> the same time updating the documentation to make it clear these
> cover all kinds of hooks, not just the configuration-defined ones,
> may be sufficient.
Agreed, let's keep it simple.
@Thomas, can you please send a v2 to update the documentation to make it
clear that disabling the hook event disables both the config-defined
hooks and the hookdir hooks for that event?
Just a short mention like you specified in hook.h, to avoid any
ambiguity.
Many thanks,
Adrian
next prev parent reply other threads:[~2026-10-22 13:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 18:19 [PATCH 0/2] Fix two hook configuration bugs Thomas Bachem via GitGitGadget
2026-10-20 18:19 ` [PATCH 1/2] hook: honor hook.<event>.enabled for the hookdir hook Thomas Bachem via GitGitGadget
2026-10-20 18:46 ` Junio C Hamano
2026-10-20 20:59 ` Adrian Ratiu
2026-10-21 17:42 ` Junio C Hamano
2026-10-22 13:40 ` Adrian Ratiu [this message]
2026-10-20 18:19 ` [PATCH 2/2] hook: accept .enabled and .parallel given without a value Thomas Bachem via GitGitGadget
2026-10-23 13:19 ` [PATCH v2 0/2] Two hook configuration changes Thomas Bachem via GitGitGadget
2026-10-23 13:19 ` [PATCH v2 1/2] hook: make hook.<event>.enabled cover the hookdir hook Thomas Bachem via GitGitGadget
2026-10-23 13:19 ` [PATCH v2 2/2] hook: accept .enabled and .parallel given without a value Thomas Bachem via GitGitGadget
2026-10-23 17:53 ` [PATCH v2 0/2] Two hook configuration changes Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874ied3las.fsf@collabora.com \
--to=adrian.ratiu@collabora.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=mail@thomasbachem.com \
--cc=nasamuffin@google.com \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox