Commit 03aed214 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

get_maintainer: look for arbitrary letter prefixes in sections

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.

Link: http://lkml.kernel.org/r/1477332323.1984.8.camel@perches.comSigned-off-by: default avatarJoe Perches <joe@perches.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Dave Airlie <airlied@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a8cfdc68
...@@ -49,6 +49,7 @@ my $scm = 0; ...@@ -49,6 +49,7 @@ my $scm = 0;
my $web = 0; my $web = 0;
my $subsystem = 0; my $subsystem = 0;
my $status = 0; my $status = 0;
my $letters = "";
my $keywords = 1; my $keywords = 1;
my $sections = 0; my $sections = 0;
my $file_emails = 0; my $file_emails = 0;
...@@ -241,6 +242,7 @@ if (!GetOptions( ...@@ -241,6 +242,7 @@ if (!GetOptions(
'status!' => \$status, 'status!' => \$status,
'scm!' => \$scm, 'scm!' => \$scm,
'web!' => \$web, 'web!' => \$web,
'letters=s' => \$letters,
'pattern-depth=i' => \$pattern_depth, 'pattern-depth=i' => \$pattern_depth,
'k|keywords!' => \$keywords, 'k|keywords!' => \$keywords,
'sections!' => \$sections, 'sections!' => \$sections,
...@@ -271,7 +273,8 @@ $output_multiline = 0 if ($output_separator ne ", "); ...@@ -271,7 +273,8 @@ $output_multiline = 0 if ($output_separator ne ", ");
$output_rolestats = 1 if ($interactive); $output_rolestats = 1 if ($interactive);
$output_roles = 1 if ($output_rolestats); $output_roles = 1 if ($output_rolestats);
if ($sections) { if ($sections || $letters ne "") {
$sections = 1;
$email = 0; $email = 0;
$email_list = 0; $email_list = 0;
$scm = 0; $scm = 0;
...@@ -682,9 +685,11 @@ sub get_maintainers { ...@@ -682,9 +685,11 @@ sub get_maintainers {
$line =~ s/\\\./\./g; ##Convert \. to . $line =~ s/\\\./\./g; ##Convert \. to .
$line =~ s/\.\*/\*/g; ##Convert .* to * $line =~ s/\.\*/\*/g; ##Convert .* to *
} }
$line =~ s/^([A-Z]):/$1:\t/g; my $count = $line =~ s/^([A-Z]):/$1:\t/g;
if ($letters eq "" || (!$count || $letters =~ /$1/i)) {
print("$line\n"); print("$line\n");
} }
}
print("\n"); print("\n");
} }
} }
...@@ -814,6 +819,7 @@ Other options: ...@@ -814,6 +819,7 @@ Other options:
--pattern-depth => Number of pattern directory traversals (default: 0 (all)) --pattern-depth => Number of pattern directory traversals (default: 0 (all))
--keywords => scan patch for keywords (default: $keywords) --keywords => scan patch for keywords (default: $keywords)
--sections => print all of the subsystem sections with pattern matches --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) --mailmap => use .mailmap file (default: $email_use_mailmap)
--version => show version --version => show version
--help => show this help information --help => show this help information
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment