On 1/9/24 13:28, Michael Brown wrote: > On 09/01/2024 12:13, Laszlo Ersek wrote: >> On 1/9/24 11:45, Ard Biesheuvel wrote: >>> Note that git am does support a 'From: ' header as the first line of >>> the commit log, and will use it correctly to supersede the From: >>> header in the SMTP envelope. >> >> OTOH, that doesn't help in this case, IIUC. When the poster originally >> formats and sends the patch, their gitconfig says >> user.email=foo...@example.com, and the author meta-datum on the patch >> most likely *also* says foo...@example.com. (I.e., they are formatting a >> patch they have authored themselves.) Therefore >> git-format-patch/git-send-email have no reason to include an explicit >> "From:" line at the top of the commit message body. I agree that >> "From:", if present, mitigates the issue, but in most cases, I reckon, >> it's not present. > > Is there a way to configure git to force git-format-patch to > unconditionally include the inline "From:" header? I tried: > > git config format.forceInBodyFrom true > > which is described in the man page as "may help if the mailing list > software mangles the sender’s identity", but it seems to have an effect > only if "--from" is also specified.
That still sounds great; I (and I expect many others) use alias(es) around git-format-patch anyway (because of [1] eg.), so wiring "--from" into that could work. (Not that I personally need this quirk right at the moment.) [1] https://github.com/tianocore/tianocore.github.io/wiki/Laszlo%27s-unkempt-git-guide-for-edk2-contributors-and-maintainers#contrib-23 What confuses me is that git-format-patch(1) specifically advises against the "--from" option "if you are feeding the result to git send-email". Huh. Thanks! Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113448): https://edk2.groups.io/g/devel/message/113448 Mute This Topic: https://groups.io/mt/103534194/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-