Commit f5f5078db2c61bf42ed20527731c0a23bed86c11

Authored by Joe Perches
Committed by Linus Torvalds
1 parent bdf7c685aa

scripts/get_maintainer.pl: improve --git-chief-penquins (Linus Torvalds) filtering

Moved linux-kernel@vger.kernel.org to MAINTAINERS
lkml will be added to all CC lists via F: pattern match

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>

Showing 1 changed file with 12 additions and 15 deletions Side-by-side Diff

scripts/get_maintainer.pl
... ... @@ -216,16 +216,20 @@
216 216  
217 217 }
218 218  
219   -if ($email_git_penguin_chiefs) {
  219 +if ($email) {
220 220 foreach my $chief (@penguin_chief) {
221 221 if ($chief =~ m/^(.*):(.*)/) {
222   - my $chief_name = $1;
223   - my $chief_addr = $2;
  222 + my $email_address;
224 223 if ($email_usename) {
225   - push(@email_to, format_email($chief_name, $chief_addr));
  224 + $email_address = format_email($1, $2);
226 225 } else {
227   - push(@email_to, $chief_addr);
  226 + $email_address = $2;
228 227 }
  228 + if ($email_git_penguin_chiefs) {
  229 + push(@email_to, $email_address);
  230 + } else {
  231 + @email_to = grep(!/${email_address}/, @email_to);
  232 + }
229 233 }
230 234 }
231 235 }
232 236  
... ... @@ -236,10 +240,7 @@
236 240 @to = (@to, @email_to);
237 241 }
238 242 if ($email_list) {
239   - if (@list_to == 0) {
240   - push(@list_to, "linux-kernel\@vger.kernel.org");
241 243 @to = (@to, @list_to);
242   - }
243 244 }
244 245 output(uniq(@to));
245 246 }
... ... @@ -314,7 +315,7 @@
314 315 [--email --git --m --n --l --multiline]
315 316  
316 317 Other options:
317   - --version -> show version
  318 + --version => show version
318 319 --help => show this help information
319 320  
320 321 EOT
... ... @@ -423,7 +424,7 @@
423 424 sub which {
424 425 my ($bin) = @_;
425 426  
426   - foreach my $path (split /:/, $ENV{PATH}) {
  427 + foreach my $path (split(/:/, $ENV{PATH})) {
427 428 if (-e "$path/$bin") {
428 429 return "$path/$bin";
429 430 }
430 431  
... ... @@ -446,12 +447,8 @@
446 447 }
447 448  
448 449 $cmd = "git log --since=${email_git_since} -- ${file}";
449   - $cmd .= " | grep -Pi \"^[-_ a-z]+by:.*\\\@\"";
450   - if (!$email_git_penguin_chiefs) {
451   - $cmd .= " | grep -Pv \"${penguin_chiefs}\"";
452   - }
  450 + $cmd .= " | grep -Pi \"^[-_ a-z]+by:.*\\\@.*\$\"";
453 451 $cmd .= " | cut -f2- -d\":\"";
454   - $cmd .= " | sed -e \"s/^\\s+//g\"";
455 452 $cmd .= " | sort | uniq -c | sort -rn";
456 453  
457 454 $output = `${cmd}`;