public inbox for tools@linux.kernel.org
 help / color / mirror / Atom feed
From: "Antonin Godard" <antonin.godard@bootlin.com>
To: "Breno Leitao" <leitao@debian.org>,
	"Kernel.org Tools" <tools@kernel.org>
Cc: "Konstantin Ryabitsev" <konstantin@linuxfoundation.org>,
	<kernel-team@meta.com>
Subject: Re: [PATCH b4] send: Add --force-cover-letter to send separate cover for single patch patch series
Date: Thu, 29 Jan 2026 12:18:41 +0100	[thread overview]
Message-ID: <DG115TDKJFHA.2VQ4J0C51DKHX@bootlin.com> (raw)
In-Reply-To: <20260127-force-cover-letter-v1-1-1ba8d7f9a64f@debian.org>

Hi,

On Tue Jan 27, 2026 at 1:53 PM CET, Breno Leitao wrote:
> By default, b4 mixes the cover letter content into the patch body
> (under the --- cut line) when sending a single-patch series. Add
> --force-cover-letter option to allow sending a separate cover letter
> message (as 0/1) even for single-patch series.
>
> This is useful when developers want to send a long cover letter with
> extra information about an issue, and a commit. Having the cover-letter
> "mixed-in" makes it hard to follow.
>
> Example:
>  * https://lore.kernel.org/all/20260127-ipmi-v1-0-ba5cc90f516f@debian.org/
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
>  src/b4/command.py |  2 ++
>  src/b4/ez.py      | 16 +++++++++-------
>  2 files changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/src/b4/command.py b/src/b4/command.py
> index 1f8b8f1..0e685cd 100644
> --- a/src/b4/command.py
> +++ b/src/b4/command.py
> @@ -397,6 +397,8 @@ def setup_parser() -> argparse.ArgumentParser:
>                           help='Resend a previously sent version of the series')
>      sp_send.add_argument('--no-sign', action='store_true', default=False,
>                           help='Do not add the cryptographic attestation signature header')
> +    sp_send.add_argument('--force-cover-letter', action='store_true', default=False,
> +                         help='Send a cover letter even for single-patch series')

I've had a different idea with this which would go a bit further.

Instead of --force-cover-letter, have a --cover-letter option which acts as
follows:

* --cover-letter=yes: always generate a cover-letter, no matter if it's a single
  patch or not

* --cover-letter=auto (default): generate a cover-letter when there is more
  than one patch. This is the current behavior.

* --cover-letter=no: do not generate a cover-letter, even on multi-patch series

This would be backed up by a setting (b4.send-cover-letter?) which can be set
globally or on a per-branch basis.

I don't know how easy it would be to support the last use-case though, as I
don't know how b4 is going to behave with a multi-patch series with no
cover-letter, but since you figured out the code paths I guess it would be
relatively easy to try? Obviously, --edit-cover would have to be adapted as well
to refuse editing the cover when --cover-letter=no.

I do find myself needing the last use-case sometimes, when the series does
not require a cover-letter.

What do you think?

Antonin

  parent reply	other threads:[~2026-01-29 11:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-27 12:53 [PATCH b4] send: Add --force-cover-letter to send separate cover for single patch patch series Breno Leitao
2026-01-28 18:14 ` Luca Ceresoli
2026-01-28 18:47   ` Breno Leitao
2026-01-29 11:18 ` Antonin Godard [this message]
2026-01-29 13:21   ` Breno Leitao
2026-01-29 13:51     ` Antonin Godard
2026-01-29 14:03       ` Breno Leitao
2026-01-29 14:15         ` Mark Brown
2026-01-29 15:00           ` Breno Leitao
2026-02-24 18:57 ` Konstantin Ryabitsev

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=DG115TDKJFHA.2VQ4J0C51DKHX@bootlin.com \
    --to=antonin.godard@bootlin.com \
    --cc=kernel-team@meta.com \
    --cc=konstantin@linuxfoundation.org \
    --cc=leitao@debian.org \
    --cc=tools@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox