From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Christian Brauner <brauner@kernel.org>,
"Kernel.org Tools" <tools@kernel.org>
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
Christian Brauner <christian@amutable.com>
Subject: Re: [PATCH b4] send: add --in-reply-to option for threading cover letters
Date: Fri, 6 Mar 2026 15:36:45 +0100 [thread overview]
Message-ID: <cfd7d6b4-3d19-4405-98e2-52ab3250eff4@kernel.org> (raw)
In-Reply-To: <20260306-b4-send-in-reply-to-v1-1-730b9b47d25f@kernel.org>
On 3/6/26 15:13, Christian Brauner wrote:
> Add a --in-reply-to flag to b4 send that sets the In-Reply-To and
> References headers on the cover letter (or single patch). This allows
> sending a new series version as a reply to the previous version or to
Ewww, don't give people bad ideas please :) That usecase is a mess.
> an existing discussion thread, which is a common workflow on mailing
This makes sense. And it would be really amazing if the given message id was
also used to grab all people from the thread and add them to cc! I find that
part most tedious in these situations. I'm aware the lore page of the
message gives you a command line, but it strips people's names, leaving only
addresses. And it's still manual work.
Thanks!
> lists that b4 did not directly support until now.
>
> The message ID is automatically wrapped in angle brackets if not
> already provided with them.
>
> Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
> Signed-off-by: Christian Brauner <brauner@kernel.org>
> ---
> src/b4/command.py | 2 ++
> src/b4/ez.py | 14 ++++++++++++++
> 2 files changed, 16 insertions(+)
>
> diff --git a/src/b4/command.py b/src/b4/command.py
> index a49a8bc..c246d30 100644
> --- a/src/b4/command.py
> +++ b/src/b4/command.py
> @@ -425,6 +425,8 @@ def setup_parser() -> argparse.ArgumentParser:
> help='Do not add any addresses found in the cover or patch trailers to To: or Cc:')
> sp_send.add_argument('--to', nargs='+', metavar='ADDR', help='Addresses to add to the To: list')
> sp_send.add_argument('--cc', nargs='+', metavar='ADDR', help='Addresses to add to the Cc: list')
> + sp_send.add_argument('--in-reply-to', dest='in_reply_to', metavar='MSGID',
> + help='Message ID to use as In-Reply-To for the cover letter (or single patch)')
> sp_send.add_argument('--not-me-too', action='store_true', default=False,
> help='Remove yourself from the To: or Cc: list')
> sp_send.add_argument('--resend', metavar='vN', nargs='?', const='latest',
> diff --git a/src/b4/ez.py b/src/b4/ez.py
> index 52eb239..3e703ed 100644
> --- a/src/b4/ez.py
> +++ b/src/b4/ez.py
> @@ -2203,6 +2203,20 @@ def cmd_send(cmdargs: argparse.Namespace) -> None:
> logger.info('')
> sys.exit(130)
>
> + if cmdargs.in_reply_to:
> + irt = cmdargs.in_reply_to.strip()
> + if not irt.startswith('<'):
> + irt = f'<{irt}>'
> + cover_msg = patches[0][1]
> + if cover_msg['In-Reply-To']:
> + cover_msg.replace_header('In-Reply-To', irt)
> + else:
> + cover_msg.add_header('In-Reply-To', irt)
> + if cover_msg['References']:
> + cover_msg.replace_header('References', irt)
> + else:
> + cover_msg.add_header('References', irt)
> +
> # And now we go through each message to set addressees and send them off
> sign = True
> _csnps = str(config.get('send-no-patatt-sign', ''))
>
> ---
> base-commit: 5b4eaae60fd938a865dda1916885e9a1c7ddce8a
> change-id: 20260306-b4-send-in-reply-to-907e8e36d7f8
>
>
next prev parent reply other threads:[~2026-03-06 14:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 14:13 [PATCH b4] send: add --in-reply-to option for threading cover letters Christian Brauner
2026-03-06 14:36 ` Vlastimil Babka (SUSE) [this message]
2026-03-06 15:02 ` Konstantin Ryabitsev
2026-03-06 15:26 ` Christian Brauner
2026-03-06 15:41 ` Konstantin Ryabitsev
2026-03-06 16:17 ` Christian Brauner
2026-03-06 17:26 ` Konstantin Ryabitsev
2026-03-07 14:11 ` Christian Brauner
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=cfd7d6b4-3d19-4405-98e2-52ab3250eff4@kernel.org \
--to=vbabka@kernel.org \
--cc=brauner@kernel.org \
--cc=christian@amutable.com \
--cc=konstantin@linuxfoundation.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