lkml.org 
[lkml]   [2019]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] get_maintainer: Add --cc option
Date
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
\
 
 \ /
  Last update: 2019-06-24 15:04    [W:0.124 / U:0.516 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site