public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Jim Cromie <jim.cromie@gmail.com>
To: joe@perches.com, linux-kernel@vger.kernel.org
Cc: Jim Cromie <jim.cromie@gmail.com>, git@vger.kernel.org
Subject: [PATCH 1/1] get_maintainer.pl: add --cc option to produce comma separated list of emails
Date: Thu, 19 Mar 2026 10:06:33 -0600	[thread overview]
Message-ID: <20260319160633.1149562-1-jim.cromie@gmail.com> (raw)

This new option works as follows:

  git send-email --cc=$(scripts/get_maintainer.pl -cc 0*.patch) 0*.patch

A complementary patch has been sent to git@vger.kernel.org, allowing:

  git send-email --cc=scripts/get_maintainer.pl 0*.patch

send-email recognizes that its single arg is executable, and runs it
in a subshell with --cc @ARGV, eliminating the chance that the user
forgets options and arguments.

It also does the same for --to and --bcc, in case get_maintainer can
usefully distinguish who should get the to's from the cc's.

cc: git@vger.kernel.org
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
 scripts/get_maintainer.pl | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 4414194bedcf..6c9ca793fd6e 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -48,6 +48,7 @@ my $email_remove_duplicates = 1;
 my $email_use_mailmap = 1;
 my $output_multiline = 1;
 my $output_separator = ", ";
+my $output_cc = 0;
 my $output_roles = 0;
 my $output_rolestats = 1;
 my $output_substatus = undef;
@@ -265,6 +266,7 @@ if (!GetOptions(
 		'moderated!' => \$email_moderated_list,
 		's!' => \$email_subscriber_list,
 		'multiline!' => \$output_multiline,
+		'cc!' => \$output_cc,
 		'roles!' => \$output_roles,
 		'rolestats!' => \$output_rolestats,
 		'separator=s' => \$output_separator,
@@ -320,6 +322,15 @@ if (!defined $output_substatus) {
     $output_substatus = $email && $output_roles && -t STDOUT;
 }
 
+if ($output_cc) {
+    $email_usename = 0;
+    $output_multiline = 0;
+    $output_separator = ",";
+    $output_rolestats = 0;
+    $output_roles = 0;
+    $output_substatus = 0;
+}
+
 if ($sections || $letters ne "") {
     $sections = 1;
     $email = 0;
@@ -1096,6 +1107,7 @@ MAINTAINER field selection options:
   --bug => print bug reporting info if any
 
 Output type options:
+  --cc => print comma separated list of all emails
   --separator [, ] => separator for multiple entries on 1 line
     using --separator also sets --nomultiline if --separator is not [, ]
   --multiline => print 1 entry per line
-- 
2.53.0


             reply	other threads:[~2026-03-19 16:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19 16:06 Jim Cromie [this message]
2026-03-19 16:13 ` [PATCH 1/1] get_maintainer.pl: add --cc option to produce comma separated list of emails Joe Perches
2026-03-19 16:56   ` jim.cromie
2026-03-19 17:08     ` Joe Perches

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=20260319160633.1149562-1-jim.cromie@gmail.com \
    --to=jim.cromie@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.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