Skip to content

Commit 03aed21

Browse files
JoePerchestorvalds
authored andcommitted
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/[email protected] Signed-off-by: Joe Perches <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Dave Airlie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent a8cfdc6 commit 03aed21

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

scripts/get_maintainer.pl

+9-3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
my $web = 0;
5050
my $subsystem = 0;
5151
my $status = 0;
52+
my $letters = "";
5253
my $keywords = 1;
5354
my $sections = 0;
5455
my $file_emails = 0;
@@ -241,6 +242,7 @@
241242
'status!' => \$status,
242243
'scm!' => \$scm,
243244
'web!' => \$web,
245+
'letters=s' => \$letters,
244246
'pattern-depth=i' => \$pattern_depth,
245247
'k|keywords!' => \$keywords,
246248
'sections!' => \$sections,
@@ -271,7 +273,8 @@
271273
$output_rolestats = 1 if ($interactive);
272274
$output_roles = 1 if ($output_rolestats);
273275

274-
if ($sections) {
276+
if ($sections || $letters ne "") {
277+
$sections = 1;
275278
$email = 0;
276279
$email_list = 0;
277280
$scm = 0;
@@ -682,8 +685,10 @@ sub get_maintainers {
682685
$line =~ s/\\\./\./g; ##Convert \. to .
683686
$line =~ s/\.\*/\*/g; ##Convert .* to *
684687
}
685-
$line =~ s/^([A-Z]):/$1:\t/g;
686-
print("$line\n");
688+
my $count = $line =~ s/^([A-Z]):/$1:\t/g;
689+
if ($letters eq "" || (!$count || $letters =~ /$1/i)) {
690+
print("$line\n");
691+
}
687692
}
688693
print("\n");
689694
}
@@ -814,6 +819,7 @@ sub usage {
814819
--pattern-depth => Number of pattern directory traversals (default: 0 (all))
815820
--keywords => scan patch for keywords (default: $keywords)
816821
--sections => print all of the subsystem sections with pattern matches
822+
--letters => print all matching 'letter' types from all matching sections
817823
--mailmap => use .mailmap file (default: $email_use_mailmap)
818824
--version => show version
819825
--help => show this help information

0 commit comments

Comments
 (0)