Linux maintainer tooling and workflows
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Maximilian Weigand <mweigand@mweigand.net>
Cc: tools@linux.kernel.org
Subject: Re: b4: workflow for selecting to/cc targets of individual patches
Date: Wed, 31 May 2023 13:41:03 -0700	[thread overview]
Message-ID: <20230531204103.GA1864972@dev-arch.thelio-3990X> (raw)
In-Reply-To: <bdefe087-28a2-d541-933c-ccd743cc8b62@mweigand.net>

Hi Maximilian,

On Wed, May 31, 2023 at 08:57:58PM +0200, Maximilian Weigand wrote:
> Hi everyone,
> 
> as a very new and inexperienced patch submitter I am currently
> struggling to properly prepare/submit a patch set where patches are
> targeted at different maintainers and would be interested in the
> proposed way to do this using b4:
> 
> My understanding (also from reading a bit in the tools archive) is that
> the cover letter should be addressed to all maintainers and mailing
> lists targeted in any of the patches, while individual patches should go
> only to the maintainers (via To:) and lists (via Cc:) they are targeted at.
> 
> Using b4 prep --auto-to-cc is not an option here, as all To:/CC:
> addresses in the cover letter will be used in all patches (my
> understanding, based on b4 send --dry-run tests).
> 
> Therefore, the only way I currently see is to populate individual
> commits/patches with To:/Cc: lines in their respective trailers, e.g.
> based on suitable (manual) calls to get_maintainer.pl, such is used
> internally by b4 prep --auto-to-cc. Is that the recommended way?
> 
> I have not seen many patches on the mailing lists that contain To:/Cc:
> lines in their trailers and am wondering that behavior would be
> acceptable? If yes, would it make sense to add functionality to b4 that
> would populate individual patches with To:/Cc:, similar to --auto-to-cc
> does for the cover letter?

I am not sure if this is the "recommended" way but what I have done in
the past is included the To and Cc trailers in the commit message of the
change in git with a '---' between my signoff and those trailers,
something like:

    <commit_title>

    <commit_message>

    <trailers>
    Signed-off-by: name <email>
    ---
    To: name <email>
    Cc: name <email>

You can see what it will look like if you flip through the patches here:

https://lore.kernel.org/20221228-drop-qunused-arguments-v2-0-9adbddd20d86@kernel.org/

I recommend adding them to the scissor area (i.e., include them after an
explicit '---' in the commit message versus adding them to the
<trailers> area) so that when the patch is actually applied, they do not
get included in git history, as they can result in extra spam if any
patches end up in a stable release.

It might make sense to have some way for b4 to do this like with
'--auto-to-cc' but I would generally say it is rare to need to send a
series with a conglomeration of patches with a single cover letter to
multiple maintainers, unless you are doing a massive treewide change, in
which case, it is often better to break down the series per subsystem,
which can help with tracking and sending new revisions. That might just
be my opinion though :)

Hope this is helpful, cheers!
Nathan

  reply	other threads:[~2023-05-31 20:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31 18:57 b4: workflow for selecting to/cc targets of individual patches Maximilian Weigand
2023-05-31 20:41 ` Nathan Chancellor [this message]
2023-06-02  8:28   ` Maximilian Weigand
2023-06-02 16:44 ` 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=20230531204103.GA1864972@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=mweigand@mweigand.net \
    --cc=tools@linux.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