Re: git-am applies commit message diffs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 10, 2026, 15:47 UTC
- Message-ID
- <xmqq34381tze.fsf@gitster.g>
- In-Reply-To
- <aYs_P8QujA6mL81-@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 6 quoted lines
> 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.
Show 9 quoted lines
>> 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?