Re: git-am applies commit message diffs
From: Junio C Hamano <hidden>
Date: 2026-02-10 15:47:03
Patrick Steinhardt [off-list ref] writes:
That is worth a thought indeed. I guess one of the biggest questions here is whether we can introduce such an unambiguous mode in such a way that old Git clients/patch(1) would continue to understand them. I wouldn't mind much if they would still misinterpret the ambiguous parts. But if so, we could make this unambiguous mode the default without a breaking change.
Yup, if the old versions misinterpret exactly the same way as before, then it does not even have to be called "unambiguous mode" that is on by default. I doubt it is possible, though.
quoted
Obviously if you're sending the contents together, a malicious user could edit the formatted patch to move or copy whatever the "signifier" for patch vs commit separator is... but at least we'd prevent the cases where someone accidentally includes diffs without intending to.Well, if we had such an unambiguous mode I would say that eventually, Git should start to refuse patches that have been generated without this mode by default.
Or any unsigned patch, perhaps?