aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/get_maintainer.pl
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2009-06-16 18:33:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 22:47:53 -0400
commit290603c1205242691b8a0963f496d0aa80e9ca02 (patch)
tree973ee2b547070a12500099fbf99563bed2845955 /scripts/get_maintainer.pl
parent8e8a2dea0ca91fe2cb7de7ea212124cfe8c82c35 (diff)
scripts/get_maintainer.pl: output first field only in mailing lists and after maintainers.
Fix mailing lists that are described, but not "(subscriber-only)" 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-xscripts/get_maintainer.pl46
1 files changed, 27 insertions, 19 deletions
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 60dc0c48c929..c4b25a7a2599 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -13,7 +13,7 @@
13use strict; 13use strict;
14 14
15my $P = $0; 15my $P = $0;
16my $V = '0.15'; 16my $V = '0.16';
17 17
18use Getopt::Long qw(:config no_auto_abbrev); 18use Getopt::Long qw(:config no_auto_abbrev);
19 19
@@ -169,6 +169,7 @@ foreach my $file (@ARGV) {
169} 169}
170 170
171my @email_to = (); 171my @email_to = ();
172my @list_to = ();
172my @scm = (); 173my @scm = ();
173my @web = (); 174my @web = ();
174my @subsystem = (); 175my @subsystem = ();
@@ -182,7 +183,7 @@ foreach my $file (@files) {
182 183
183 my $exclude = 0; 184 my $exclude = 0;
184 foreach my $line (@typevalue) { 185 foreach my $line (@typevalue) {
185 if ($line =~ m/^(\C):(.*)/) { 186 if ($line =~ m/^(\C):\s*(.*)/) {
186 my $type = $1; 187 my $type = $1;
187 my $value = $2; 188 my $value = $2;
188 if ($type eq 'X') { 189 if ($type eq 'X') {
@@ -196,7 +197,7 @@ foreach my $file (@files) {
196 if (!$exclude) { 197 if (!$exclude) {
197 my $tvi = 0; 198 my $tvi = 0;
198 foreach my $line (@typevalue) { 199 foreach my $line (@typevalue) {
199 if ($line =~ m/^(\C):(.*)/) { 200 if ($line =~ m/^(\C):\s*(.*)/) {
200 my $type = $1; 201 my $type = $1;
201 my $value = $2; 202 my $value = $2;
202 if ($type eq 'F') { 203 if ($type eq 'F') {
@@ -229,15 +230,18 @@ if ($email_git_penguin_chiefs) {
229 } 230 }
230} 231}
231 232
232if ($email) { 233if ($email || $email_list) {
233 my $address_cnt = @email_to; 234 my @to = ();
234 if ($address_cnt == 0 && $email_list) { 235 if ($email) {
235 push(@email_to, "linux-kernel\@vger.kernel.org"); 236 @to = (@to, @email_to);
236 } 237 }
237 238 if ($email_list) {
238#Don't sort email address list, but do remove duplicates 239 if (@list_to == 0) {
239 @email_to = uniq(@email_to); 240 push(@list_to, "linux-kernel\@vger.kernel.org");
240 output(@email_to); 241 @to = (@to, @list_to);
242 }
243 }
244 output(uniq(@to));
241} 245}
242 246
243if ($scm) { 247if ($scm) {
@@ -307,7 +311,7 @@ Output type options:
307 --multiline => print 1 entry per line 311 --multiline => print 1 entry per line
308 312
309Default options: 313Default options:
310 [--email --git --m --l --multiline] 314 [--email --git --m --n --l --multiline]
311 315
312Other options: 316Other options:
313 --version -> show version 317 --version -> show version
@@ -366,26 +370,30 @@ sub add_categories {
366 $index = $index - 1; 370 $index = $index - 1;
367 while ($index >= 0) { 371 while ($index >= 0) {
368 my $tv = $typevalue[$index]; 372 my $tv = $typevalue[$index];
369 if ($tv =~ m/^(\C):(.*)/) { 373 if ($tv =~ m/^(\C):\s*(.*)/) {
370 my $ptype = $1; 374 my $ptype = $1;
371 my $pvalue = $2; 375 my $pvalue = $2;
372 if ($ptype eq "L") { 376 if ($ptype eq "L") {
373 my $subscr = $pvalue; 377 my $list_address = $pvalue;
374 if ($subscr =~ m/\s*\(subscribers-only\)/) { 378 my $list_additional = "";
379 if ($list_address =~ m/([^\s]+)\s+(.*)$/) {
380 $list_address = $1;
381 $list_additional = $2;
382 }
383 if ($list_additional =~ m/\(subscribers-only\)/) {
375 if ($email_subscriber_list) { 384 if ($email_subscriber_list) {
376 $subscr =~ s/\s*\(subscribers-only\)//g; 385 push(@list_to, $list_address);
377 push(@email_to, $subscr);
378 } 386 }
379 } else { 387 } else {
380 if ($email_list) { 388 if ($email_list) {
381 push(@email_to, $pvalue); 389 push(@list_to, $list_address);
382 } 390 }
383 } 391 }
384 } elsif ($ptype eq "M") { 392 } elsif ($ptype eq "M") {
385 if ($email_maintainer) { 393 if ($email_maintainer) {
386 if ($index >= 0) { 394 if ($index >= 0) {
387 my $tv = $typevalue[$index - 1]; 395 my $tv = $typevalue[$index - 1];
388 if ($tv =~ m/^(\C):(.*)/) { 396 if ($tv =~ m/^(\C):\s*(.*)/) {
389 if ($1 eq "P" && $email_usename) { 397 if ($1 eq "P" && $email_usename) {
390 push(@email_to, format_email($2, $pvalue)); 398 push(@email_to, format_email($2, $pvalue));
391 } else { 399 } else {