Skip to content

Commit

Permalink
get_maintainer: allow usage outside of kernel tree
Browse files Browse the repository at this point in the history
Add option '--no-tree' to get_maintainer.pl script to allow using this
script in projects that aren't the Linux kernel if they use the same
format for their MAINTAINERS file.  This command is also available in
checkpatch.pl, for example.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Antonio Nino Diaz <[email protected]>
Cc: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Antonio Nino Diaz authored and torvalds committed Aug 22, 2018
1 parent 92e6417 commit 31bb82c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/get_maintainer.pl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
my $output_rolestats = 1;
my $output_section_maxlen = 50;
my $scm = 0;
my $tree = 1;
my $web = 0;
my $subsystem = 0;
my $status = 0;
Expand Down Expand Up @@ -255,6 +256,7 @@
'subsystem!' => \$subsystem,
'status!' => \$status,
'scm!' => \$scm,
'tree!' => \$tree,
'web!' => \$web,
'letters=s' => \$letters,
'pattern-depth=i' => \$pattern_depth,
Expand Down Expand Up @@ -319,7 +321,7 @@
die "$P: Please select at least 1 email option\n";
}

if (!top_of_kernel_tree($lk_path)) {
if ($tree && !top_of_kernel_tree($lk_path)) {
die "$P: The current directory does not appear to be "
. "a linux kernel source tree.\n";
}
Expand Down Expand Up @@ -1031,13 +1033,14 @@ sub usage {
--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)
--no-tree => run without a kernel tree
--self-test => show potential issues with MAINTAINERS file content
--version => show version
--help => show this help information
Default options:
[--email --nogit --git-fallback --m --r --n --l --multiline --pattern-depth=0
--remove-duplicates --rolestats]
[--email --tree --nogit --git-fallback --m --r --n --l --multiline
--pattern-depth=0 --remove-duplicates --rolestats]
Notes:
Using "-f directory" may give unexpected results:
Expand Down

0 comments on commit 31bb82c

Please sign in to comment.