Re: [PATCH b4] send: Add --force-cover-letter to send separate cover for single patch patch series

Breno Leitao
2026-01-29T13:21:15Z

On Thu, Jan 29, 2026 at 12:18:41PM +0100, Antonin Godard wrote:
> 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
> 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.

Why do you need this case? I undertand a cover letter is required for
a multi patch series, so, it can have an easy merge commit when merging
the series.

Thanks
--breno