From: Kristoffer Haugsbakk Date: Wed, 11 Feb 2026 15:23:02 GMT Subject: Re: git-am applies commit message diffs Message-ID: <958c4cb1-8ca0-4559-abfc-b50d009cc680@app.fastmail.com> In-Reply-To: <20260211074751.GB1867915@coredump.intra.peff.net> On Wed, Feb 11, 2026, at 08:47, Jeff King wrote: > On Tue, Feb 10, 2026 at 06:34:05PM -0800, Jacob Keller wrote: > >> > Hmm. If we add a new unambiguous marker after the ---, old versions >> > would see '...' and know to cut the description. New versions would >> > wait for and properly ignore any diff/etc prior to this. >> > >> > Since is after a ---, it would be ignored and not >> > inserted as part of the commit message, and because all versions >> > universally accept cruft between --- and the diff start, this should >> > be acceptable right? >> >> Keeping in mind we'd have to use as something that we >> somehow reject as being a valid part of a commit message somehow, so >> that you can't accidentally insert it, and we'd need to be careful >> about rejecting formatting such a patch, and probably complaining on >> the receiving end if we see multiple markers.. Trickier than it sounds >> I imagine. > > Yeah, on reading your first message, I wondered if we would run into a > commit message adding "---" followed by the new marker. If the new > marker is forbidden, I guess that works. But how ugly is that new marker > going to be, then? ;) We'll now see it in every email. Maybe it could be something like ``? It’s difficult to accidentally get a trailing whitespace into a commit. > If we are going to modify what format-patch produces, I'd be more > inclined to have it perform some reversible quoting on the commit > message so that "---" and "diff" lines are not recognized. And then that > quoting only has to kick in when a message would be ambiguous, so most > people wouldn't even see it. This sounds better anyway. >[snip]