diff options
author | Joe Perches <joe@perches.com> | 2010-05-24 17:33:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-25 11:07:04 -0400 |
commit | 368669da205cd7aac33a2c75f4c81b5ad28efd67 (patch) | |
tree | 4a11753da992d3bc158191bfd4712061eee0f399 /scripts/get_maintainer.pl | |
parent | e4d26b027a0b7e289fdc542fe06535329b457dd5 (diff) |
scripts/get_maintainer.pl: add .get_maintainer.conf default options file
Allow the use of a .get_maintainer.conf file to control the default
options applied when scripts/get_maintainer.pl is run.
.get_maintainer.conf can contain any valid command-line argument.
File contents are prepended to any additional command line arguments.
Multiple lines may be used, blank lines ignored, # is a comment.
Updated scripts/get_maintainer.pl version to 0.24
Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Florian Mickler <florian@mickler.org>
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 | 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 | ||