{"thread":{"id":"65304","subject":"[PATCH 1/1] get_maintainer.pl: add --cc option to produce comma separated list of emails","startedAt":"2026-03-19T16:06:53Z","lastAt":"2026-03-19T17:08:34Z","messageCount":4,"participants":["Jim Cromie","Joe Perches","jim.cromie@gmail.com"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"539396","messageId":"20260319160633.1149562-1-jim.cromie@gmail.com","threadId":"65304","inReplyTo":null,"subject":"[PATCH 1/1] get_maintainer.pl: add --cc option to produce comma separated list of emails","fromName":"Jim Cromie","fromEmail":"jim.cromie@gmail.com","sentAt":"2026-03-19T16:06:33Z","receivedAt":"2026-03-19T16:06:53Z","isPatch":true,"sender":{"key":"jim.cromie@gmail.com","avatar":null},"body":"This new option works as follows:\n\n  git send-email --cc=$(scripts/get_maintainer.pl -cc 0*.patch) 0*.patch\n\nA complementary patch has been sent to git@vger.kernel.org, allowing:\n\n  git send-email --cc=scripts/get_maintainer.pl 0*.patch\n\nsend-email recognizes that its single arg is executable, and runs it\nin a subshell with --cc @ARGV, eliminating the chance that the user\nforgets options and arguments.\n\nIt also does the same for --to and --bcc, in case get_maintainer can\nusefully distinguish who should get the to's from the cc's.\n\ncc: git@vger.kernel.org\nSigned-off-by: Jim Cromie <jim.cromie@gmail.com>\n---\n scripts/get_maintainer.pl | 12 ++++++++++++\n 1 file changed, 12 insertions(+)\n\ndiff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl\nindex 4414194bedcf..6c9ca793fd6e 100755\n--- a/scripts/get_maintainer.pl\n+++ b/scripts/get_maintainer.pl\n@@ -48,6 +48,7 @@ my $email_remove_duplicates = 1;\n my $email_use_mailmap = 1;\n my $output_multiline = 1;\n my $output_separator = \", \";\n+my $output_cc = 0;\n my $output_roles = 0;\n my $output_rolestats = 1;\n my $output_substatus = undef;\n@@ -265,6 +266,7 @@ if (!GetOptions(\n \t\t'moderated!' => \\$email_moderated_list,\n \t\t's!' => \\$email_subscriber_list,\n \t\t'multiline!' => \\$output_multiline,\n+\t\t'cc!' => \\$output_cc,\n \t\t'roles!' => \\$output_roles,\n \t\t'rolestats!' => \\$output_rolestats,\n \t\t'separator=s' => \\$output_separator,\n@@ -320,6 +322,15 @@ if (!defined $output_substatus) {\n     $output_substatus = $email && $output_roles && -t STDOUT;\n }\n \n+if ($output_cc) {\n+    $email_usename = 0;\n+    $output_multiline = 0;\n+    $output_separator = \",\";\n+    $output_rolestats = 0;\n+    $output_roles = 0;\n+    $output_substatus = 0;\n+}\n+\n if ($sections || $letters ne \"\") {\n     $sections = 1;\n     $email = 0;\n@@ -1096,6 +1107,7 @@ MAINTAINER field selection options:\n   --bug => print bug reporting info if any\n \n Output type options:\n+  --cc => print comma separated list of all emails\n   --separator [, ] => separator for multiple entries on 1 line\n     using --separator also sets --nomultiline if --separator is not [, ]\n   --multiline => print 1 entry per line\n-- \n2.53.0\n\n"},{"id":"539398","messageId":"b69406326eceb27f5973bc0ba55366438845a003.camel@perches.com","threadId":"65304","inReplyTo":"20260319160633.1149562-1-jim.cromie@gmail.com","subject":"Re: [PATCH 1/1] get_maintainer.pl: add --cc option to produce comma separated list of emails","fromName":"Joe Perches","fromEmail":"joe@perches.com","sentAt":"2026-03-19T16:13:58Z","receivedAt":"2026-03-19T16:14:01Z","isPatch":true,"sender":{"key":"joe@perches.com","avatar":"https://avatars.githubusercontent.com/u/13122723?v=4"},"body":"On Thu, 2026-03-19 at 10:06 -0600, Jim Cromie wrote:\n> ```\n> This new option works as follows:\n> \n>   git send-email --cc=$(scripts/get_maintainer.pl -cc 0*.patch) 0*.patch\n> \n> A complementary patch has been sent to [git@vger.kernel.org](mailto:git@vger.kernel.org), allowing:\n> \n>   git send-email --cc=scripts/get_maintainer.pl 0*.patch\n\nI think this is not particularly useful.\nJust use a script.\n"},{"id":"539406","messageId":"CAJfuBxxbV1X3X0GdvBEEHB8gS9wQ8hHcKDGC7GrSkOPECgGV3A@mail.gmail.com","threadId":"65304","inReplyTo":"b69406326eceb27f5973bc0ba55366438845a003.camel@perches.com","subject":"Re: [PATCH 1/1] get_maintainer.pl: add --cc option to produce comma separated list of emails","fromName":"","fromEmail":"jim.cromie@gmail.com","sentAt":"2026-03-19T16:56:45Z","receivedAt":"2026-03-19T16:57:12Z","isPatch":true,"sender":{"key":"jim.cromie@gmail.com","avatar":null},"body":"On Thu, Mar 19, 2026 at 10:14 AM Joe Perches <joe@perches.com> wrote:\n>\n> On Thu, 2026-03-19 at 10:06 -0600, Jim Cromie wrote:\n> > ```\n> > This new option works as follows:\n> >\n> >   git send-email --cc=$(scripts/get_maintainer.pl -cc 0*.patch) 0*.patch\n> >\n> > A complementary patch has been sent to [git@vger.kernel.org](mailto:git@vger.kernel.org), allowing:\n> >\n> >   git send-email --cc=scripts/get_maintainer.pl 0*.patch\n>\n> I think this is not particularly useful.\n> Just use a script.\n\n   1. Efficiency (One-Shot vs. Per-Patch): Unlike --cc-cmd, which runs\nonce per patch file, this runs once for the entire series. For a large\nseries or\n      a slow script (like get_maintainer.pl), this is a  performance\nwin and avoids redundant processing.\n   2. Dry-Run Integrity: By integrating it into send-email, the script\nexecution is part of the command's own logic. This ensures that\n--dry-run\n      accurately reflects exactly what the script produced within the\ncontext of the mailing operation.\n   3. Argument Deduplication: It eliminates the \"Double-entry\" problem\nwhere you have to pass the patch list twice (once to the subshell and\nonce to git\n      send-email). This reduces the chance of a typo causing you to\nsend patches to the wrong set of maintainers if the lists get out of\nsync.\n   4. Configuration Synergy: You can now set sendemail.cc =\n./scripts/get_maintainer.pl in your .git/config. A shell wrapper can't\neasily override or\n      augment the built-in recipient logic as cleanly as this does.\n\nThat last point seems a clear win.\nFar less maintainer annoyance at not receiving the entire patchset.\n"},{"id":"539409","messageId":"5d28fa8fda122093fcfcf6f948f67184c0c9018e.camel@perches.com","threadId":"65304","inReplyTo":"CAJfuBxxbV1X3X0GdvBEEHB8gS9wQ8hHcKDGC7GrSkOPECgGV3A@mail.gmail.com","subject":"Re: [PATCH 1/1] get_maintainer.pl: add --cc option to produce comma separated list of emails","fromName":"Joe Perches","fromEmail":"joe@perches.com","sentAt":"2026-03-19T17:08:30Z","receivedAt":"2026-03-19T17:08:34Z","isPatch":true,"sender":{"key":"joe@perches.com","avatar":"https://avatars.githubusercontent.com/u/13122723?v=4"},"body":"On Thu, 2026-03-19 at 10:56 -0600, jim.cromie@gmail.com wrote:\n> On Thu, Mar 19, 2026 at 10:14 AM Joe Perches <[joe@perches.com](mailto:joe@perches.com)> wrote:\n> > On Thu, 2026-03-19 at 10:06 -0600, Jim Cromie wrote:\n> > > This new option works as follows:\n> > >   git send-email --cc=$(scripts/get_maintainer.pl -cc 0*.patch) 0*.patch\n> > I think this is not particularly useful.\n> > Just use a script.\n\n[1-3] remedied by script\n\n>    4. Configuration Synergy: You can now set sendemail.cc =\n> ./scripts/get_maintainer.pl in your .git/config. A shell wrapper can't\n> easily override or\n>       augment the built-in recipient logic as cleanly as this does.\n> \n> That last point seems a clear win.\n> Far less maintainer annoyance at not receiving the entire patchset.\n\nThat's not my experience.\n\nThis _will_ cc disinterested parties when there's a cover letter\nfor a large series.\n"}]}