diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/get_maintainer.pl | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 6f97a13bcee4..f66018d1d5ee 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
@@ -25,6 +25,7 @@ my $email_list = 1; | |||
25 | my $email_subscriber_list = 0; | 25 | my $email_subscriber_list = 0; |
26 | my $email_git_penguin_chiefs = 0; | 26 | my $email_git_penguin_chiefs = 0; |
27 | my $email_git = 1; | 27 | my $email_git = 1; |
28 | my $email_git_all_signature_types = 1; | ||
28 | my $email_git_blame = 0; | 29 | my $email_git_blame = 0; |
29 | my $email_git_min_signatures = 1; | 30 | my $email_git_min_signatures = 1; |
30 | my $email_git_max_maintainers = 5; | 31 | my $email_git_max_maintainers = 5; |
@@ -51,9 +52,9 @@ my $help = 0; | |||
51 | my $exit = 0; | 52 | my $exit = 0; |
52 | 53 | ||
53 | my @penguin_chief = (); | 54 | my @penguin_chief = (); |
54 | push(@penguin_chief,"Linus Torvalds:torvalds\@linux-foundation.org"); | 55 | push(@penguin_chief, "Linus Torvalds:torvalds\@linux-foundation.org"); |
55 | #Andrew wants in on most everything - 2009/01/14 | 56 | #Andrew wants in on most everything - 2009/01/14 |
56 | #push(@penguin_chief,"Andrew Morton:akpm\@linux-foundation.org"); | 57 | #push(@penguin_chief, "Andrew Morton:akpm\@linux-foundation.org"); |
57 | 58 | ||
58 | my @penguin_chief_names = (); | 59 | my @penguin_chief_names = (); |
59 | foreach my $chief (@penguin_chief) { | 60 | foreach my $chief (@penguin_chief) { |
@@ -63,7 +64,16 @@ foreach my $chief (@penguin_chief) { | |||
63 | push(@penguin_chief_names, $chief_name); | 64 | push(@penguin_chief_names, $chief_name); |
64 | } | 65 | } |
65 | } | 66 | } |
66 | my $penguin_chiefs = "\(" . join("|",@penguin_chief_names) . "\)"; | 67 | my $penguin_chiefs = "\(" . join("|", @penguin_chief_names) . "\)"; |
68 | |||
69 | # Signature types of people who are either | ||
70 | # a) responsible for the code in question, or | ||
71 | # b) familiar enough with it to give relevant feedback | ||
72 | my @signature_tags = (); | ||
73 | push(@signature_tags, "Signed-off-by:"); | ||
74 | push(@signature_tags, "Reviewed-by:"); | ||
75 | push(@signature_tags, "Acked-by:"); | ||
76 | my $signaturePattern = "\(" . join("|", @signature_tags) . "\)"; | ||
67 | 77 | ||
68 | # rfc822 email address - preloaded methods go here. | 78 | # rfc822 email address - preloaded methods go here. |
69 | my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])"; | 79 | my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])"; |
@@ -100,6 +110,7 @@ my %VCS_cmds_hg = ( | |||
100 | if (!GetOptions( | 110 | if (!GetOptions( |
101 | 'email!' => \$email, | 111 | 'email!' => \$email, |
102 | 'git!' => \$email_git, | 112 | 'git!' => \$email_git, |
113 | 'git-all-signature-types!' => \$email_git_all_signature_types, | ||
103 | 'git-blame!' => \$email_git_blame, | 114 | 'git-blame!' => \$email_git_blame, |
104 | 'git-chief-penguins!' => \$email_git_penguin_chiefs, | 115 | 'git-chief-penguins!' => \$email_git_penguin_chiefs, |
105 | 'git-min-signatures=i' => \$email_git_min_signatures, | 116 | 'git-min-signatures=i' => \$email_git_min_signatures, |
@@ -180,6 +191,10 @@ if (!top_of_kernel_tree($lk_path)) { | |||
180 | . "a linux kernel source tree.\n"; | 191 | . "a linux kernel source tree.\n"; |
181 | } | 192 | } |
182 | 193 | ||
194 | if ($email_git_all_signature_types) { | ||
195 | $signaturePattern = "(.+?)[Bb][Yy]:"; | ||
196 | } | ||
197 | |||
183 | ## Read MAINTAINERS for type/value pairs | 198 | ## Read MAINTAINERS for type/value pairs |
184 | 199 | ||
185 | my @typevalue = (); | 200 | my @typevalue = (); |
@@ -497,13 +512,15 @@ version: $V | |||
497 | MAINTAINER field selection options: | 512 | MAINTAINER field selection options: |
498 | --email => print email address(es) if any | 513 | --email => print email address(es) if any |
499 | --git => include recent git \*-by: signers | 514 | --git => include recent git \*-by: signers |
515 | --git-all-signature-types => include signers regardless of signature type | ||
516 | or use only ${signaturePattern} signers (default: $email_git_all_signature_types) | ||
500 | --git-chief-penguins => include ${penguin_chiefs} | 517 | --git-chief-penguins => include ${penguin_chiefs} |
501 | --git-min-signatures => number of signatures required (default: 1) | 518 | --git-min-signatures => number of signatures required (default: $email_git_min_signatures) |
502 | --git-max-maintainers => maximum maintainers to add (default: 5) | 519 | --git-max-maintainers => maximum maintainers to add (default: $email_git_max_maintainers) |
503 | --git-min-percent => minimum percentage of commits required (default: 5) | 520 | --git-min-percent => minimum percentage of commits required (default: $email_git_min_percent) |
504 | --git-blame => use git blame to find modified commits for patch or file | 521 | --git-blame => use git blame to find modified commits for patch or file |
505 | --git-since => git history to use (default: 1-year-ago) | 522 | --git-since => git history to use (default: $email_git_since) |
506 | --hg-since => hg history to use (default: -365) | 523 | --hg-since => hg history to use (default: $email_hg_since) |
507 | --m => include maintainer(s) if any | 524 | --m => include maintainer(s) if any |
508 | --n => include name 'Full Name <addr\@domain.tld>' | 525 | --n => include name 'Full Name <addr\@domain.tld>' |
509 | --l => include list(s) if any | 526 | --l => include list(s) if any |
@@ -964,7 +981,7 @@ sub vcs_find_signers { | |||
964 | 981 | ||
965 | $commits = grep(/$pattern/, @lines); # of commits | 982 | $commits = grep(/$pattern/, @lines); # of commits |
966 | 983 | ||
967 | @lines = grep(/^[-_ a-z]+by:.*\@.*$/i, @lines); | 984 | @lines = grep(/^[ \t]*${signaturePattern}.*\@.*$/, @lines); |
968 | if (!$email_git_penguin_chiefs) { | 985 | if (!$email_git_penguin_chiefs) { |
969 | @lines = grep(!/${penguin_chiefs}/i, @lines); | 986 | @lines = grep(!/${penguin_chiefs}/i, @lines); |
970 | } | 987 | } |