From: Adrian Ratiu Date: Tue, 20 Oct 2026 20:59:46 GMT Subject: Re: [PATCH 1/2] hook: honor hook..enabled for the hookdir hook Message-ID: <877bjc2im5.fsf@collabora.com> In-Reply-To: On October 20, 2026 6:46:43 PM UTC, Junio C Hamano wrote: >"Thomas Bachem via GitGitGadget" writes: > >> From: Thomas Bachem >> >> The documentation added by dcfb5af67e (hook: add hook..enabled >> switch, 2026-04-10) says that with hook..enabled set to false >> "no hooks fire for that event", but only hooks defined in the >> configuration are skipped. > >It is good to see that the original author and those who helped >were CC'ed. > >I have a suspicion that the current behavior may be very much >deliberate, and the documentation was written too loosely. In >other words, the author may have been so excited about their shiny >new toy, the configuration-defined hook mechanism, that they wrote >as if that were the only kind of hook that existed in the world, >even though that is not true. The suspicion is correct: I did not intend to disable the hookdir hooks via configs when I wrote that initially. My reasoning was something like "configs affect just the config-defined hooks, the traditional hookdir hooks behave the same as before". So currently the doc is indeed just too loose. 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. :)