All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mirko Faina <mroik@delayed.space>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>, Mirko Faina <mroik@delayed.space>
Subject: [PATCH] format-patch: fix from header in cover letter
Date: Sat, 14 Feb 2026 06:49:23 +0100	[thread overview]
Message-ID: <aZAMr6XOwKkTa55q@exploit> (raw)

From: Mroik <mroik@delayed.space>

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

Signed-off-by: Mroik <mroik@delayed.space>
---
 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

             reply	other threads:[~2026-02-14  5:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-14  5:49 Mirko Faina [this message]
2026-02-16 11:01 ` [PATCH] format-patch: fix from header in cover letter Junio C Hamano
2026-02-16 15:27 ` [PATCH v2] format-patch: fix From " Mirko Faina
2026-02-17  6:22   ` Patrick Steinhardt
2026-02-17  6:34     ` Jeff King
2026-02-17 13:21       ` D. Ben Knoble
2026-02-19 11:29         ` Jeff King
2026-02-19 12:03           ` Mirko Faina
2026-02-19 13:43           ` D. Ben Knoble
2026-02-17 15:22       ` Junio C Hamano
2026-02-19 11:43         ` Jeff King
2026-02-20 18:11           ` Junio C Hamano
2026-02-17 22:04   ` [PATCH] " Mroik
2026-02-17 22:13     ` Mirko Faina
2026-02-17 22:43       ` Junio C Hamano
2026-02-17 22:41     ` Junio C Hamano
2026-02-17 23:25     ` [PATCH v4] " Mirko Faina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aZAMr6XOwKkTa55q@exploit \
    --to=mroik@delayed.space \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.