linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Jani Nikula <jani.nikula@intel.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	daniel@ffwll.ch, airlied@gmail.com, akpm@linux-foundation.org
Subject: [RFC PATCH] get_maintainer: Look for arbitrary letter prefixes in sections
Date: Mon, 24 Oct 2016 11:05:23 -0700	[thread overview]
Message-ID: <1477332323.1984.8.camel@perches.com> (raw)
In-Reply-To: <1476966135-26943-1-git-send-email-jani.nikula@intel.com>

Jani Nikula proposes patches to add a few new letter prefixes
for "B:" bug reporting and "C:" maintainer chatting to the
various sections of MAINTAINERS.

Add a generic mechanism to get_maintainer.pl to find sections that
have any combination of "[A-Z]" letter prefix types in a section.

Signed-off-by: Joe Perches <joe@perches.com>
---
 scripts/get_maintainer.pl | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index aed4511f0304..633f2dd3de27 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -49,6 +49,7 @@ my $scm = 0;
 my $web = 0;
 my $subsystem = 0;
 my $status = 0;
+my $letters = "";
 my $keywords = 1;
 my $sections = 0;
 my $file_emails = 0;
@@ -241,6 +242,7 @@ if (!GetOptions(
 		'status!' => \$status,
 		'scm!' => \$scm,
 		'web!' => \$web,
+		'letters=s' => \$letters,
 		'pattern-depth=i' => \$pattern_depth,
 		'k|keywords!' => \$keywords,
 		'sections!' => \$sections,
@@ -271,7 +273,8 @@ $output_multiline = 0 if ($output_separator ne ", ");
 $output_rolestats = 1 if ($interactive);
 $output_roles = 1 if ($output_rolestats);
 
-if ($sections) {
+if ($sections || $letters ne "") {
+    $sections = 1;
     $email = 0;
     $email_list = 0;
     $scm = 0;
@@ -682,8 +685,10 @@ sub get_maintainers {
 			$line =~ s/\\\./\./g;       	##Convert \. to .
 			$line =~ s/\.\*/\*/g;       	##Convert .* to *
 		    }
-		    $line =~ s/^([A-Z]):/$1:\t/g;
-		    print("$line\n");
+		    my $count = $line =~ s/^([A-Z]):/$1:\t/g;
+		    if ($letters eq "" || (!$count || $letters =~ /$1/i)) {
+			print("$line\n");
+		    }
 		}
 		print("\n");
 	    }
@@ -814,6 +819,7 @@ Other options:
   --pattern-depth => Number of pattern directory traversals (default: 0 (all))
   --keywords => scan patch for keywords (default: $keywords)
   --sections => print all of the subsystem sections with pattern matches
+  --letters => print all matching 'letter' types from all matching sections
   --mailmap => use .mailmap file (default: $email_use_mailmap)
   --version => show version
   --help => show this help information

  parent reply	other threads:[~2016-10-24 18:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-20 12:22 [PATCH 1/4] MAINTAINERS: Add "B:" for URI where to file bugs Jani Nikula
2016-10-20 12:22 ` [PATCH 2/4] MAINTAINERS: add drm and drm/i915 bug filing info Jani Nikula
2016-10-20 12:22 ` [PATCH 3/4] MAINTAINERS: Add "C:" for URI for chat where developers hang out Jani Nikula
2016-10-20 12:22 ` [PATCH 4/4] MAINTAINERS: add drm and drm/i915 irc channels Jani Nikula
2016-10-24  8:31 ` [PATCH 1/4] MAINTAINERS: Add "B:" for URI where to file bugs Daniel Vetter
2016-10-24  8:48 ` Andrew Donnellan
2016-10-24 18:05 ` Joe Perches [this message]
2016-11-03  9:07   ` [RFC PATCH] get_maintainer: Look for arbitrary letter prefixes in sections Paul Bolle
2016-11-03  9:16     ` Joe Perches
2016-11-03  9:18       ` Paul Bolle

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=1477332323.1984.8.camel@perches.com \
    --to=joe@perches.com \
    --cc=airlied@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=linux-kernel@vger.kernel.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).