From: Junio C Hamano Date: Tue, 03 Nov 2026 20:38:53 GMT Subject: Re: Interaction between pre-commit hook and git commit Message-ID: In-Reply-To: "Kristoffer Haugsbakk" writes: > Reading githooks documentation for pre-commit. To me it reads like > the use case is validation/checking, not any mutation. Yes, the hook was written exactly for validation, to preempt an undesirable commit from being created. We might want to do two things: (1) clarify the documentation to say that the hook should not try mutation, and (2) detect and error out when the hook does try to make any mutation. I am not sure if (2) is feasible, though. Thanks.