Re: [PATCH 3/3] templates: detect messages that contain a separator line
- From
Jeff King <peff@peff.net>
- Date
- Feb 10, 2026, 06:44 UTC
- Message-ID
- <20260210064419.GA1756549@coredump.intra.peff.net>
- In-Reply-To
- <b0c456ce-94f6-4155-8cbd-3dd75a9cc52c@gmail.com>
On Mon, Feb 09, 2026 at 10:42:49AM +0000, Phillip Wood wrote:
Show 14 quoted lines
> > I do it, too, though not all that often. Once upon a time I had a patch > > to teach git-commit to auto-convert lines after "---" into a note (which > > would then be formatted back out via format-patch). But I found for my > > git.git workflow that just letting the "---" ride along in the commit > > object was simpler and easier (since I don't care about having pristine > > commit objects, as their ultimate fate is to be dropped in favor of what > > is applied upstream). > > I do it too occasionally. I had planned just to use "--no-verify" when I did > that but maybe we should just drop this patch. We could make it configurable > as Kristoffer suggested, or, as we have the raw message, we could look for a > special comment like "# allow ---" but I'm not sure I want to spend much > more time on this. At least "---" only truncates the message rather than > applying an unwanted patch.
Just to be clear, I am OK either way, as I do not use the sample commit-msg hook. ;) Since the sample is mostly for illustrative purposes, maybe it is fine to potentially over-reach and let people trim it as they see fit.
-Peff