Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186255
b: refs/heads/master
c: 4b76c9d
h: refs/heads/master
i:
  186253: 6ddc199
  186251: 53b2dee
  186247: 845ab86
  186239: a58d2b3
v: v3
  • Loading branch information
Joe Perches authored and Linus Torvalds committed Mar 6, 2010
1 parent b23bd22 commit 8224f68
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03372dbbe618bfcd02f9c8cdbfe78e97e3aad43b
refs/heads/master: 4b76c9da611593eed6a13527c5ebd00c173624ad
36 changes: 32 additions & 4 deletions trunk/scripts/get_maintainer.pl
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
my $subsystem = 0;
my $status = 0;
my $keywords = 1;
my $sections = 0;
my $file_emails = 0;
my $from_filename = 0;
my $pattern_depth = 0;
Expand Down Expand Up @@ -121,6 +122,7 @@
'web!' => \$web,
'pattern-depth=i' => \$pattern_depth,
'k|keywords!' => \$keywords,
'sections!' => \$sections,
'fe|file-emails!' => \$file_emails,
'f|file' => \$from_filename,
'v|version' => \$version,
Expand Down Expand Up @@ -152,10 +154,20 @@
$output_roles = 1;
}

my $selections = $email + $scm + $status + $subsystem + $web;
if ($selections == 0) {
usage();
die "$P: Missing required option: email, scm, status, subsystem or web\n";
if ($sections) {
$email = 0;
$email_list = 0;
$scm = 0;
$status = 0;
$subsystem = 0;
$web = 0;
$keywords = 0;
} else {
my $selections = $email + $scm + $status + $subsystem + $web;
if ($selections == 0) {
usage();
die "$P: Missing required option: email, scm, status, subsystem or web\n";
}
}

if ($email &&
Expand Down Expand Up @@ -357,6 +369,21 @@

foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) {
add_categories($line);
if ($sections) {
my $i;
my $start = find_starting_index($line);
my $end = find_ending_index($line);
for ($i = $start; $i < $end; $i++) {
my $line = $typevalue[$i];
if ($line =~ /^[FX]:/) { ##Restore file patterns
$line =~ s/([^\\])\.([^\*])/$1\?$2/g;
$line =~ s/([^\\])\.$/$1\?/g; ##Convert . back to ?
$line =~ s/\\\./\./g; ##Convert \. to .
$line =~ s/\.\*/\*/g; ##Convert .* to *
}
print("$line\n");
}
}
}

if ($email && $email_git) {
Expand Down Expand Up @@ -486,6 +513,7 @@ sub usage {
Other options:
--pattern-depth => Number of pattern directory traversals (default: 0 (all))
--keywords => scan patch for keywords (default: 1 (on))
--sections => print the entire subsystem sections with pattern matches
--version => show version
--help => show this help information
Expand Down

0 comments on commit 8224f68

Please sign in to comment.