From: Florian Mickler <florian@mickler.org>
To: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Stephen Hemminger <shemminger@vyatta.com>,
linux-kernel@vger.kernel.org,
Stefan Richter <stefanr@s5r6.in-berlin.de>
Subject: Re: [PATCH] scripts/get_maintainer.pl: add .get_maintainer.conf default options file
Date: Sun, 9 May 2010 11:12:09 +0200 [thread overview]
Message-ID: <20100509111209.6c871a68@schatten.dmk.lab> (raw)
In-Reply-To: <1273357609.704.70.camel@Joe-Laptop.home>
On Sat, 08 May 2010 15:26:49 -0700
Joe Perches <joe@perches.com> wrote:
> 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 entries can be any valid argument.
>
> Multiple lines may be used, blank lines ignored, # is a comment
>
> Signed-off-by: Joe Perches <joe@perches.com>
probably worth noting, that an entry is of the form
"--cmdlinearg"
as that's unexpected for a config file.
> ---
> scripts/get_maintainer.pl | 24 ++++++++++++++++++++++++
> 1 files changed, 24 insertions(+), 0 deletions(-)
>
> diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
> index 6f97a13..0c4c7e0 100755
> --- a/scripts/get_maintainer.pl
> +++ b/scripts/get_maintainer.pl
> @@ -97,6 +97,30 @@ my %VCS_cmds_hg = (
> "blame_commit_pattern" => "^([0-9a-f]+):"
> );
>
> +if (-f ${lk_path}.get_maintainer.conf) {
missing "" around the argument to -f ...
i wouldn't put the trailing slash in the variables but add it when composing path's.
but it seems this is the convention for get_maintainer.pl...
> + my @conf_args;
> + open(my $conffile, '<', "${lk_path}.get_maintainer.conf")
> + or warn "$P: Can't open .get_maintainer.conf: $!\n";
> + while (<$conffile>) {
> + my $line = $_;
> +
> + $line =~ s/\s*\n?$//g;
> + $line =~ s/^\s*//g;
> + $line =~ s/\s+/ /g;
> +
> + next if ($line =~ m/^\s*#/);
> + next if ($line =~ m/^\s*$/);
> +
> + my @words = split(" ", $line);
> + foreach my $word (@words) {
> + last if ($word =~ m/^#/);
> + push (@conf_args, $word);
> + }
> + }
> + close($conffile);
> + unshift(@ARGV, @conf_args) if @conf_args;
> +}
this works.
> +
> if (!GetOptions(
> 'email!' => \$email,
> 'git!' => \$email_git,
>
Reviewed-by:Florian Mickler <florian@mickler.org>
next prev parent reply other threads:[~2010-05-09 9:12 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-06 1:57 [PATCH] epoll: use wrapper functions Changli Gao
2010-05-06 6:00 ` indiscriminate get_maintainer.pl usage (was [PATCH] epoll: use wrapper functions) Stefan Richter
[not found] ` <s2t412e6f7f1005052319sdbf3fdfbg256d11b983c4f304@mail.gmail.com>
2010-05-06 6:40 ` indiscriminate get_maintainer.pl usage Stefan Richter
2010-05-06 15:42 ` Davide Libenzi
2010-05-06 16:52 ` Joe Perches
2010-05-06 17:59 ` Davide Libenzi
2010-05-06 20:52 ` Joe Perches
2010-05-07 6:34 ` [PATCH] get_maintainer.pl: ignore non-maintainer tags florian
2010-05-07 6:39 ` Joe Perches
2010-05-07 7:02 ` Florian Mickler
2010-05-07 19:48 ` Stefan Richter
2010-05-08 21:32 ` [PATCH] get_maintainer.pl: optionally " florian
2010-05-08 21:39 ` [PATCH] [RFC] get_maintainer.pl: only list maintainers by default florian
2010-05-08 22:44 ` Joe Perches
2010-05-08 23:23 ` Stefan Richter
2010-05-08 23:51 ` Joe Perches
2010-05-09 0:22 ` Stefan Richter
2010-05-09 0:57 ` Joe Perches
2010-05-09 8:18 ` Stefan Richter
2010-05-09 8:41 ` Stefan Richter
2010-05-09 8:49 ` Florian Mickler
2010-05-09 9:12 ` Stefan Richter
2010-05-09 8:40 ` Florian Mickler
2010-05-08 22:06 ` [PATCH] get_maintainer.pl: optionally ignore non-maintainer tags Joe Perches
2010-05-09 9:15 ` [PATCH v2] " florian
2010-05-09 9:35 ` Stefan Richter
2010-05-10 4:56 ` [PATCH 0/2] scripts/get_maintainer.pl: trivial improvements Joe Perches
2010-05-10 4:56 ` [PATCH 1/2] scripts/get_maintainer.pl: optionally ignore non-maintainer signatures Joe Perches
2010-05-10 5:07 ` Florian Mickler
2010-05-11 6:36 ` [PATCH] scripts/get_maintainer.pl: default to not include unspecified tags florian
2010-05-11 7:48 ` Wolfram Sang
2010-05-11 15:59 ` Joe Perches
2010-05-11 16:33 ` Florian Mickler
2010-05-11 16:40 ` Joe Perches
2010-05-10 4:56 ` [PATCH 2/2] scripts/get_maintainer.pl: add .get_maintainer.conf default options file Joe Perches
2010-05-12 6:30 ` Américo Wang
2010-05-12 9:25 ` Florian Mickler
2010-05-13 15:58 ` Américo Wang
2010-05-13 16:22 ` Joe Perches
2010-05-08 22:26 ` [PATCH] " Joe Perches
2010-05-09 9:12 ` Florian Mickler [this message]
2010-05-06 20:13 ` indiscriminate get_maintainer.pl usage Roland Dreier
2010-05-06 18:47 ` [PATCH] epoll: use wrapper functions Davide Libenzi
2010-05-06 18:51 ` Peter Zijlstra
2010-05-07 2:48 ` Changli Gao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100509111209.6c871a68@schatten.dmk.lab \
--to=florian@mickler.org \
--cc=akpm@linux-foundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shemminger@vyatta.com \
--cc=stefanr@s5r6.in-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.