[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mailman From header rewrite
From: |
Kyle Meyer |
Subject: |
Re: Mailman From header rewrite |
Date: |
Sat, 24 Jul 2021 18:00:04 -0400 |
Sarah Morgensen writes:
> On Tuesday, January 5th, 2021 at 5:01 AM, Kyle Meyer <kyle@kyleam.com> wrote:
>
>> add the appropriate "From:" header to the body of each patch. `git am`
>> will take the in-body header over the actual header.
>
> I wonder if there is a way to automate the duplication of the "From"
> header into the body of the patch?
I'm not aware of an existing way at the git level. Here's the only
discussion I found about it on the git list:
https://lore.kernel.org/git/305577c2-709a-b632-4056-6582771176ac@redhat.com/T/#u
As a hacky/ugly way, for those that are okay tweaking the way their
names ends up on the mailing list, they can adjust `send-email --from=`
(or sendemail.from) slightly so that it doesn't match
user.name/user.email, and then send-email should take care of adding an
in-body header for user.name/user.email.
Another option is of course to feed the patches to a custom
post-processing script that adds the in-body "From:", where the details
would depend a bit on the person's patch workflow.
Or, moving that work a bit upstream, I think it'd be fairly
straightforward to wire up a prepare-commit-msg hook that would insert
an in-body "From:" (after checking some things, like whether the commit
is being amended). I guess the main disadvantage of handling it at this
spot is the risk of commits with in-body "From:" headers unintentionally
being merged/pushed directly to the main line (given the person has
commit access).