linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] get_maintainer: Add --cc option
@ 2019-06-24 13:03 Sebastian Andrzej Siewior
  2019-06-24 13:33 ` Peter Zijlstra
  0 siblings, 1 reply; 12+ messages in thread
From: Sebastian Andrzej Siewior @ 2019-06-24 13:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: Joe Perches, Peter Zijlstra, Sebastian Andrzej Siewior

The --cc adds a Cc: prefix infront of the email address so it can be
used by other Scripts directly instead of adding another wrapper for
this.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 scripts/get_maintainer.pl | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index c1c088ef1420e..7f812d23218e5 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -46,6 +46,8 @@ my $output_multiline = 1;
 my $output_separator = ", ";
 my $output_roles = 0;
 my $output_rolestats = 1;
+my $output_cc_prefix = 0;
+my $cc_prefix = "";
 my $output_section_maxlen = 50;
 my $scm = 0;
 my $tree = 1;
@@ -252,6 +254,7 @@ if (!GetOptions(
 		'multiline!' => \$output_multiline,
 		'roles!' => \$output_roles,
 		'rolestats!' => \$output_rolestats,
+		'cc!' => \$output_cc_prefix,
 		'separator=s' => \$output_separator,
 		'subsystem!' => \$subsystem,
 		'status!' => \$status,
@@ -298,6 +301,10 @@ $output_multiline = 0 if ($output_separator ne ", ");
 $output_rolestats = 1 if ($interactive);
 $output_roles = 1 if ($output_rolestats);
 
+if ($output_cc_prefix) {
+    $cc_prefix = "Cc: ";
+}
+
 if ($sections || $letters ne "") {
     $sections = 1;
     $email = 0;
@@ -2462,9 +2469,9 @@ sub merge_email {
 	my ($address, $role) = @$_;
 	if (!$saw{$address}) {
 	    if ($output_roles) {
-		push(@lines, "$address ($role)");
+		push(@lines, "$cc_prefix" . "$address ($role)");
 	    } else {
-		push(@lines, $address);
+		push(@lines, "$cc_prefix" . "$address");
 	    }
 	    $saw{$address} = 1;
 	}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-06-28  9:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-24 13:03 [PATCH] get_maintainer: Add --cc option Sebastian Andrzej Siewior
2019-06-24 13:33 ` Peter Zijlstra
2019-06-24 14:27   ` Joe Perches
2019-06-24 20:25     ` Peter Zijlstra
2019-06-24 20:42       ` Joe Perches
2019-06-25  7:45         ` Peter Zijlstra
2019-06-28  9:25       ` [PATCH] get_maintainer: Add ability to skip moderated mailing lists Joe Perches
2019-06-25 16:37     ` [PATCH v2] get_maintainer: Add --prefix option Sebastian Andrzej Siewior
2019-06-25 17:23       ` Joe Perches
2019-06-26  9:36         ` Peter Zijlstra
2019-06-26 15:36           ` Joe Perches
2019-06-26 17:18             ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).