aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/get_maintainer.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/get_maintainer.pl')
-rwxr-xr-xscripts/get_maintainer.pl21
1 files changed, 14 insertions, 7 deletions
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index fb446e0f8bbf..5132949500c1 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -13,7 +13,7 @@
13use strict; 13use strict;
14 14
15my $P = $0; 15my $P = $0;
16my $V = '0.18beta2'; 16my $V = '0.19';
17 17
18use Getopt::Long qw(:config no_auto_abbrev); 18use Getopt::Long qw(:config no_auto_abbrev);
19 19
@@ -37,6 +37,7 @@ my $web = 0;
37my $subsystem = 0; 37my $subsystem = 0;
38my $status = 0; 38my $status = 0;
39my $from_filename = 0; 39my $from_filename = 0;
40my $pattern_depth = 0;
40my $version = 0; 41my $version = 0;
41my $help = 0; 42my $help = 0;
42 43
@@ -80,6 +81,7 @@ if (!GetOptions(
80 'status!' => \$status, 81 'status!' => \$status,
81 'scm!' => \$scm, 82 'scm!' => \$scm,
82 'web!' => \$web, 83 'web!' => \$web,
84 'pattern-depth=i' => \$pattern_depth,
83 'f|file' => \$from_filename, 85 'f|file' => \$from_filename,
84 'v|version' => \$version, 86 'v|version' => \$version,
85 'h|help' => \$help, 87 'h|help' => \$help,
@@ -226,9 +228,13 @@ foreach my $file (@files) {
226 my $value = $2; 228 my $value = $2;
227 if ($type eq 'F') { 229 if ($type eq 'F') {
228 if (file_match_pattern($file, $value)) { 230 if (file_match_pattern($file, $value)) {
229 my $pattern_depth = ($value =~ tr@/@@); 231 my $value_pd = ($value =~ tr@/@@);
230 $pattern_depth++ if (!(substr($value,-1,1) eq "/")); 232 my $file_pd = ($file =~ tr@/@@);
231 $hash{$tvi} = $pattern_depth; 233 $value_pd++ if (substr($value,-1,1) ne "/");
234 if ($pattern_depth == 0 ||
235 (($file_pd - $value_pd) < $pattern_depth)) {
236 $hash{$tvi} = $value_pd;
237 }
232 } 238 }
233 } 239 }
234 } 240 }
@@ -345,13 +351,14 @@ Output type options:
345 --separator [, ] => separator for multiple entries on 1 line 351 --separator [, ] => separator for multiple entries on 1 line
346 --multiline => print 1 entry per line 352 --multiline => print 1 entry per line
347 353
348Default options:
349 [--email --git --m --n --l --multiline]
350
351Other options: 354Other options:
355 --pattern-depth => Number of pattern directory traversals (default: 0 (all))
352 --version => show version 356 --version => show version
353 --help => show this help information 357 --help => show this help information
354 358
359Default options:
360 [--email --git --m --n --l --multiline --pattern-depth=0]
361
355Notes: 362Notes:
356 Using "-f directory" may give unexpected results: 363 Using "-f directory" may give unexpected results:
357 Used with "--git", git signators for _all_ files in and below 364 Used with "--git", git signators for _all_ files in and below