linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] get_maintainer: Add --cc option
Date: Mon, 24 Jun 2019 13:42:13 -0700	[thread overview]
Message-ID: <02324731bac2da6ef30b3812edaf213ecf626fe4.camel@perches.com> (raw)
In-Reply-To: <20190624202512.GK3436@hirez.programming.kicks-ass.net>

On Mon, 2019-06-24 at 22:25 +0200, Peter Zijlstra wrote:
> On Mon, Jun 24, 2019 at 07:27:47AM -0700, Joe Perches wrote:
> > On Mon, 2019-06-24 at 15:33 +0200, Peter Zijlstra wrote:
> > > On Mon, Jun 24, 2019 at 03:03:23PM +0200, Sebastian Andrzej Siewior wrote:
> > > > 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.
> > 
> > Not sure I like the "--cc" option naming.
> > Maybe "--prefix [string]" to be a bit more generic.
> > 
> > > Would it make sense to make '--cc' imply --no-roles --no-rolestats ?
> > 
> > Maybe.
> > 
> > It's also unlikely to be sensibly used with mailing
> > lists so maybe --nol too.
> 
> Is there also an option to exclude moderated lists?

Nope.  Not yet ;)

>  --no-s doesn't seem to do that.

I suppose a --nomoderated could work. (-m is already maintainers)

> I hate it when people cross-post to moderated lists, and
> this thing just made me do it :-(

Maybe:
---
 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}"]);
 			    }



  reply	other threads:[~2019-06-24 20:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=02324731bac2da6ef30b3812edaf213ecf626fe4.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).