Re: [PATCH] get_maintainer: Add --cc option

From: Peter Zijlstra
Date: Tue Jun 25 2019 - 03:45:33 EST


On Mon, Jun 24, 2019 at 01:42:13PM -0700, Joe Perches wrote:
> On Mon, 2019-06-24 at 22:25 +0200, Peter Zijlstra wrote:
> > I hate it when people cross-post to moderated lists, and
> > this thing just made me do it :-(
>
> Maybe:

That seems to work,

Tested-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>

Thanks!

> ---
> scripts/get_maintainer.pl | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
> index c1c088ef1420..8c2fc22f3a11 100755
> --- a/scripts/get_maintainer.pl
> +++ b/scripts/get_maintainer.pl
> @@ -27,6 +27,7 @@ my $email_usename = 1;
> my $email_maintainer = 1;
> my $email_reviewer = 1;
> my $email_list = 1;
> +my $email_moderated_list = 1;
> my $email_subscriber_list = 0;
> my $email_git_penguin_chiefs = 0;
> my $email_git = 0;
> @@ -248,6 +249,7 @@ if (!GetOptions(
> 'r!' => \$email_reviewer,
> 'n!' => \$email_usename,
> 'l!' => \$email_list,
> + 'moderated!' => \$email_moderated_list,
> 's!' => \$email_subscriber_list,
> 'multiline!' => \$output_multiline,
> 'roles!' => \$output_roles,
> @@ -1023,7 +1025,8 @@ MAINTAINER field selection options:
> --r => include reviewer(s) if any
> --n => include name 'Full Name <addr\@domain.tld>'
> --l => include list(s) if any
> - --s => include subscriber only list(s) if any
> + --moderated => include moderated lists(s) if any (default: true)
> + --s => include subscriber only list(s) if any (default: false)
> --remove-duplicates => minimize duplicate email names/addresses
> --roles => show roles (status:subsystem, git-signer, list, etc...)
> --rolestats => show roles and statistics (commits/total_commits, %)
> @@ -1313,11 +1316,14 @@ sub add_categories {
> } else {
> if ($email_list) {
> if (!$hash_list_to{lc($list_address)}) {
> - $hash_list_to{lc($list_address)} = 1;
> if ($list_additional =~ m/moderated/) {
> - push(@list_to, [$list_address,
> - "moderated list${list_role}"]);
> + if ($email_moderated_list) {
> + $hash_list_to{lc($list_address)} = 1;
> + push(@list_to, [$list_address,
> + "moderated list${list_role}"]);
> + }
> } else {
> + $hash_list_to{lc($list_address)} = 1;
> push(@list_to, [$list_address,
> "open list${list_role}"]);
> }
>
>