Thread (6 messages) flat view 6 messages, 3 authors, 18d ago

Re: [PATCH] hooks: introduce 'hooks.allowNoVerify' configuration

From: Junio C Hamano <hidden>
Date: 2026-09-02 19:21:04

"Alessio Attilio via GitGitGadget" [off-list ref] writes:
From: Alessio Attilio <redacted>

Introduce 'hooks.allowNoVerify' as an opt-in workflow guardrail to
prevent accidental bypass of hooks with '--no-verify' when set to false.
Authoritative enforcement remains server-side.
Accidental

	$ git foo --no-verify

may be prevented by setting this configuration variable, but then
would we need another layer of protection to prevent accidental

	$ git -c hooks.allownoverify foo --no-verify

by introducing another configuration variable to forbid
hooks.allownoverify to be overriden?

I do not think we want to go into this slipperly slope.  Thanks for
sending a patch, but I am personally not interested.

Besides, verifications that users may be tempted to bypass, but want
to instill discipline to prevent bypassing, may not be implemented
as hooks, and the way they are bypassed may not be "--[no-]verify"
command line option.  When one wants a way to prevent such
verifications from getting disabled, the mechanism should also allow
forbidding verification that is built into the system from getting
disabled.  Limiting a settings to hooks is probably not a good idea,
and introducing a new "hooks." hierarchy for this setting is not
something we want to see.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help