git format-patch embeds a 'From:' line as the first line of the patch
body, carrying the original commit author. Use this line - not the
email From header - as the authoritative author, because git
send-email may rewrite the header via .mailmap while the body line
preserves the original.
The parser reads the first line of the first text body part. If it
starts with 'From:', it extracts 'Name <email>'; when the name is
empty or 'unknown', only the email is kept. Body parts whose first
line is not a From line are ignored, leaving the existing header-
based author untouched.
Signed-off-by: Geliang Tang <geliang@kernel.org>
git format-patch embeds a 'From:' line as the first line of the patch body, carrying the original commit author. Use this line - not the email From header - as the authoritative author, because git send-email may rewrite the header via .mailmap while the body line preserves the original.
The parser reads the first line of the first text body part. If it starts with 'From:', it extracts 'Name '; when the name is empty or 'unknown', only the email is kept. Body parts whose first line is not a From line are ignored, leaving the existing header- based author untouched.