Subject: [PATCH] format-patch: fix from header in cover letter

From: Mirko Faina <[email-masked]>
Date: Sat, 14 Feb 2026 06:49:23 +0100

From: Mroik <[email-masked]>

Fixes "From" header for the cover letter when `--from` is passed

Signed-off-by: Mroik <[email-masked]>
---
 builtin/log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/log.c b/builtin/log.c
index d43ca693bf..df41b43fce 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1345,7 +1345,7 @@ static void make_cover_letter(struct rev_info *rev, int use_separate_file,
 	if (!cmit_fmt_is_mail(rev->commit_format))
 		die(_("cover letter needs email format"));
 
-	committer = git_committer_info(0);
+	committer = cfg->from ? cfg->from : git_committer_info(0);
 
 	if (use_separate_file &&
 	    open_next_file(NULL, rev->numbered_files ? NULL : "cover-letter", rev, quiet))
-- 
2.53.0