Subject: Re: [PATCH 0/1] Add entry to mailmap file

From: Junio C Hamano <[email-masked]>
Date: Fri, 06 Sep 2024 09:10:39 -0700

Stephen Smith <[email-masked]> writes:

>> From: "Stephen P. Smith" <[email-masked]>
>> 
>
> I don't know why git send-email added this extra From line to the body of the 
> email.  This line is not part of the file that format-patch created.

Most likely that the author name recorded in the commit object is
with "P.", but the name your MUA knows you as is without.

In such a case, the command adds what we call "in-body header" to
override the headers MUA uses (in this case, "From:" that the
recipient takes the authorship identity from).

As the name with "P." is what you signed-off your commit on the
"Signed-off-by:" trailer line, it is absolutely the right thing to
do to override the name MUA knows you as with the in-body header so
that the author name matches exactly the name used for signing it
off.  IOW, what you sent is perfectly fine.

For future reference, another header commonly overridden with an
in-body header is the "Subject:".  In a general discussion that is
not a review thread of any specific patch, somebody may come up with
a patch to improve the situtation.  In such a case, your message may
look like:

    From: A Project Participant <[email-masked]>
    Subject: Re: why does git do this?
    To: [email-masked]
    Cc: ...other particpants...

    Hmph, it does sound like a documentation bug.  How about
    clarifying it this way?

    ---- >8 ----
    Subject: doc: document the condition under which gostak distims the doshes

    The document does not exactly say when gostak distims the
    doshes.  Make sure it is clear by updating foo and bar
    documents.

    Signed-off-by: A Project Particpant <[email-masked]>
    ---

The "scissors" mark (horizontal line drawn with "-" with scissors ">8")
tells the recipient to ignore everything in the body before that line,
and then we have in-body Subject: header to override the "why does
git do this?" e-mail subject on the discussion thread with the title
of the commit.