Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

get_maintainer: allow usage outside of kernel tree

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/04452ac6-1575-f612-72c6-6ea88e70a9d5@arm.com
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Antonio Nino Diaz and committed by
Linus Torvalds
31bb82c9 92e64178

+6 -3
+6 -3
scripts/get_maintainer.pl
··· 48 48 my $output_rolestats = 1; 49 49 my $output_section_maxlen = 50; 50 50 my $scm = 0; 51 + my $tree = 1; 51 52 my $web = 0; 52 53 my $subsystem = 0; 53 54 my $status = 0; ··· 256 255 'subsystem!' => \$subsystem, 257 256 'status!' => \$status, 258 257 'scm!' => \$scm, 258 + 'tree!' => \$tree, 259 259 'web!' => \$web, 260 260 'letters=s' => \$letters, 261 261 'pattern-depth=i' => \$pattern_depth, ··· 321 319 die "$P: Please select at least 1 email option\n"; 322 320 } 323 321 324 - if (!top_of_kernel_tree($lk_path)) { 322 + if ($tree && !top_of_kernel_tree($lk_path)) { 325 323 die "$P: The current directory does not appear to be " 326 324 . "a linux kernel source tree.\n"; 327 325 } ··· 1033 1031 --sections => print all of the subsystem sections with pattern matches 1034 1032 --letters => print all matching 'letter' types from all matching sections 1035 1033 --mailmap => use .mailmap file (default: $email_use_mailmap) 1034 + --no-tree => run without a kernel tree 1036 1035 --self-test => show potential issues with MAINTAINERS file content 1037 1036 --version => show version 1038 1037 --help => show this help information 1039 1038 1040 1039 Default options: 1041 - [--email --nogit --git-fallback --m --r --n --l --multiline --pattern-depth=0 1042 - --remove-duplicates --rolestats] 1040 + [--email --tree --nogit --git-fallback --m --r --n --l --multiline 1041 + --pattern-depth=0 --remove-duplicates --rolestats] 1043 1042 1044 1043 Notes: 1045 1044 Using "-f directory" may give unexpected results: