diff options
author | Joe Perches <joe@perches.com> | 2015-06-26 01:01:50 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-26 03:00:39 +0300 |
commit | 435de0782b658c993350049e853ea9a8795df4e2 (patch) | |
tree | 05e42e9e7a0d3838a1db8765161dbee3700b16bc /scripts/get_maintainer.pl | |
parent | 3ea4331c60be3eee4c97e5ddabad95399f879b76 (diff) | |
download | linux-435de0782b658c993350049e853ea9a8795df4e2.tar.xz |
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/get_maintainer.pl')
-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) { unshift(@ARGV, @conf_args) if @conf_args; } +my @ignore_emails = (); +my $ignore_file = which_conf(".get_maintainer.ignore"); +if (-f $ignore_file) { + open(my $ignore, '<', "$ignore_file") + or warn "$P: Can't find a readable .get_maintainer.ignore file $!\n"; + while (<$ignore>) { + my $line = $_; + + $line =~ s/\s*\n?$//; + $line =~ s/^\s*//; + $line =~ s/\s+$//; + $line =~ s/#.*$//; + + next if ($line =~ m/^\s*$/); + if (rfc822_valid($line)) { + push(@ignore_emails, $line); + } + } + close($ignore); +} + if (!GetOptions( 'email!' => \$email, 'git!' => \$email_git, @@ -513,6 +534,16 @@ if ($web) { exit($exit); +sub ignore_email_address { + my ($address) = @_; + + foreach my $ignore (@ignore_emails) { + return 1 if ($ignore eq $address); + } + + return 0; +} + sub range_is_maintained { my ($start, $end) = @_; @@ -1868,6 +1899,7 @@ sub vcs_assign { my $percent = $sign_offs * 100 / $divisor; $percent = 100 if ($percent > 100); + next if (ignore_email_address($line)); $count++; last if ($sign_offs < $email_git_min_signatures || $count > $email_git_max_maintainers || |