Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938802AbcJXSOP (ORCPT ); Mon, 24 Oct 2016 14:14:15 -0400 Received: from smtprelay0243.hostedemail.com ([216.40.44.243]:39904 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758104AbcJXSF1 (ORCPT ); Mon, 24 Oct 2016 14:05:27 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 64,4,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:800:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:1981:2194:2197:2199:2200:2332:2393:2559:2562:2828:2892:3138:3139:3140:3141:3142:3354:3653:3865:3866:3867:3868:3870:3874:4321:5007:6119:6120:7903:8957:9040:9405:10004:10400:10848:11026:11658:11783:11914:12296:12346:12555:13439:13894:14093:14097:14181:14659:14721:21080:21221:21324:21433:21451:30022:30034:30046:30054:30062:30064:30075,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: crowd81_2f419c8b36a2a X-Filterd-Recvd-Size: 3106 Message-ID: <1477332323.1984.8.camel@perches.com> Subject: [RFC PATCH] get_maintainer: Look for arbitrary letter prefixes in sections From: Joe Perches To: Jani Nikula , linux-kernel Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, daniel@ffwll.ch, airlied@gmail.com, akpm@linux-foundation.org Date: Mon, 24 Oct 2016 11:05:23 -0700 In-Reply-To: <1476966135-26943-1-git-send-email-jani.nikula@intel.com> References: <1476966135-26943-1-git-send-email-jani.nikula@intel.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.1-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2138 Lines: 63 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 --- ?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