diff options
author | Joe Perches <joe@perches.com> | 2015-06-25 18:01:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-25 20:00:39 -0400 |
commit | 435de0782b658c993350049e853ea9a8795df4e2 (patch) | |
tree | 05e42e9e7a0d3838a1db8765161dbee3700b16bc /scripts | |
parent | 3ea4331c60be3eee4c97e5ddabad95399f879b76 (diff) |
get_maintainer.pl: add .get_maintainer.ignore file capability
Some people prefer not to be cc'd on patches. Add an ability to have a
file (.get_maintainer.ignore) with names and email addresses that are
excluded from being listed except when specifically listed as a maintainer
in a section.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/get_maintainer.pl | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index d7016279ec2b..fc169fd2a3cc 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
@@ -186,6 +186,27 @@ if (-f $conf) { | |||
186 | unshift(@ARGV, @conf_args) if @conf_args; | 186 | unshift(@ARGV, @conf_args) if @conf_args; |
187 | } | 187 | } |
188 | 188 | ||
189 | my @ignore_emails = (); | ||
190 | my $ignore_file = which_conf(".get_maintainer.ignore"); | ||
191 | if (-f $ignore_file) { | ||
192 | open(my $ignore, '<', "$ignore_file") | ||
193 | or warn "$P: Can't find a readable .get_maintainer.ignore file $!\n"; | ||
194 | while (<$ignore>) { | ||
195 | my $line = $_; | ||
196 | |||
197 | $line =~ s/\s*\n?$//; | ||
198 | $line =~ s/^\s*//; | ||
199 | $line =~ s/\s+$//; | ||
200 | $line =~ s/#.*$//; | ||
201 | |||
202 | next if ($line =~ m/^\s*$/); | ||
203 | if (rfc822_valid($line)) { | ||
204 | push(@ignore_emails, $line); | ||
205 | } | ||
206 | } | ||
207 | close($ignore); | ||
208 | } | ||
209 | |||
189 | if (!GetOptions( | 210 | if (!GetOptions( |
190 | 'email!' => \$email, | 211 | 'email!' => \$email, |
191 | 'git!' => \$email_git, | 212 | 'git!' => \$email_git, |
@@ -513,6 +534,16 @@ if ($web) { | |||
513 | 534 | ||
514 | exit($exit); | 535 | exit($exit); |
515 | 536 | ||
537 | sub ignore_email_address { | ||
538 | my ($address) = @_; | ||
539 | |||
540 | foreach my $ignore (@ignore_emails) { | ||
541 | return 1 if ($ignore eq $address); | ||
542 | } | ||
543 | |||
544 | return 0; | ||
545 | } | ||
546 | |||
516 | sub range_is_maintained { | 547 | sub range_is_maintained { |
517 | my ($start, $end) = @_; | 548 | my ($start, $end) = @_; |
518 | 549 | ||
@@ -1868,6 +1899,7 @@ sub vcs_assign { | |||
1868 | my $percent = $sign_offs * 100 / $divisor; | 1899 | my $percent = $sign_offs * 100 / $divisor; |
1869 | 1900 | ||
1870 | $percent = 100 if ($percent > 100); | 1901 | $percent = 100 if ($percent > 100); |
1902 | next if (ignore_email_address($line)); | ||
1871 | $count++; | 1903 | $count++; |
1872 | last if ($sign_offs < $email_git_min_signatures || | 1904 | last if ($sign_offs < $email_git_min_signatures || |
1873 | $count > $email_git_max_maintainers || | 1905 | $count > $email_git_max_maintainers || |