diff options
| -rwxr-xr-x | scripts/get_maintainer.pl | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index f66018d1d5ee..b82ac95ef2fc 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | use strict; | 13 | use strict; |
| 14 | 14 | ||
| 15 | my $P = $0; | 15 | my $P = $0; |
| 16 | my $V = '0.23'; | 16 | my $V = '0.24'; |
| 17 | 17 | ||
| 18 | use Getopt::Long qw(:config no_auto_abbrev); | 18 | use Getopt::Long qw(:config no_auto_abbrev); |
| 19 | 19 | ||
| @@ -107,6 +107,30 @@ my %VCS_cmds_hg = ( | |||
| 107 | "blame_commit_pattern" => "^([0-9a-f]+):" | 107 | "blame_commit_pattern" => "^([0-9a-f]+):" |
| 108 | ); | 108 | ); |
| 109 | 109 | ||
| 110 | if (-f "${lk_path}.get_maintainer.conf") { | ||
| 111 | my @conf_args; | ||
| 112 | open(my $conffile, '<', "${lk_path}.get_maintainer.conf") | ||
| 113 | or warn "$P: Can't open .get_maintainer.conf: $!\n"; | ||
| 114 | while (<$conffile>) { | ||
| 115 | my $line = $_; | ||
| 116 | |||
| 117 | $line =~ s/\s*\n?$//g; | ||
| 118 | $line =~ s/^\s*//g; | ||
| 119 | $line =~ s/\s+/ /g; | ||
| 120 | |||
| 121 | next if ($line =~ m/^\s*#/); | ||
| 122 | next if ($line =~ m/^\s*$/); | ||
| 123 | |||
| 124 | my @words = split(" ", $line); | ||
| 125 | foreach my $word (@words) { | ||
| 126 | last if ($word =~ m/^#/); | ||
| 127 | push (@conf_args, $word); | ||
| 128 | } | ||
| 129 | } | ||
| 130 | close($conffile); | ||
| 131 | unshift(@ARGV, @conf_args) if @conf_args; | ||
| 132 | } | ||
| 133 | |||
| 110 | if (!GetOptions( | 134 | if (!GetOptions( |
| 111 | 'email!' => \$email, | 135 | 'email!' => \$email, |
| 112 | 'git!' => \$email_git, | 136 | 'git!' => \$email_git, |
| @@ -573,6 +597,11 @@ Notes: | |||
| 573 | --git-min-signatures, --git-max-maintainers, --git-min-percent, and | 597 | --git-min-signatures, --git-max-maintainers, --git-min-percent, and |
| 574 | --git-blame | 598 | --git-blame |
| 575 | Use --hg-since not --git-since to control date selection | 599 | Use --hg-since not --git-since to control date selection |
| 600 | File ".get_maintainer.conf", if it exists in the linux kernel source root | ||
| 601 | directory, can change whatever get_maintainer defaults are desired. | ||
| 602 | Entries in this file can be any command line argument. | ||
| 603 | This file is prepended to any additional command line arguments. | ||
| 604 | Multiple lines and # comments are allowed. | ||
| 576 | EOT | 605 | EOT |
| 577 | } | 606 | } |
| 578 | 607 | ||
