From: Kristoffer Haugsbakk Date: Sat, 07 Feb 2026 21:38:10 GMT Subject: Re: [PATCH 3/3] templates: detect messages that contain a separator line Message-ID: <32614598-48f0-4e3d-ba8c-e8d96b71dbd9@app.fastmail.com> In-Reply-To: On Sat, Feb 7, 2026, at 22:27, Junio C Hamano wrote: >>[snip] > > I have no qualms about the topic up to the previous step, but I know > one of the things that I sometimes do will be broken with the change > in this step, namely, when I know what I want to write below the > three-dash lines, I would commit with "---" and additional notes > below it, so that I do not forget during "format-patch". > > When the commit is turned into a patch email, possibly with some > other material like "--notes=" that adds notes there, the > resulting message will have two three-dashes lines, but because "am" > cuts at the first one, and "apply" knows that the garbage lines at > front, including three-dash lines, do not matter until it sees "^diff", > this works out perfectly well. > > Admittedly, I myself do not send out so many patches as I used to, > but I suspect that there are others who have discovered this trick > independently, and they would be unhappy to be interrupted by > commit-msg hook like this. > > A saving grace is that when the user is stopped with this, > pre-commit hook that inspects the contents to be committed > have already run successfully, so rerunning with "--no-verify" > is not with too much risk. But still, I am not sure if this is a > good thing to do overall. Maybe this is not the right tool[1] but perhaps the hook could respect an env. variable to disable this check and hint about it in the error output? 🔗 1: https://lore.kernel.org/git/cover.1709495964.git.code@khaugsbakk.name/