From: Joe Perches on
On Wed, 2010-05-12 at 23:12 +0200, florian(a)mickler.org wrote:
> This changes the syntax of the config-file introduced in the commit
> "scripts/get_maintainer.pl: add .get_maintainer.conf default options
> file".
> Entries are now of the more commonly found form:
> key = value
> where keys are cmd-line arguments without the "--" prefixed.

I don't have a strong opinion one way or another about the
..conf file format.

Another option which could be useful: --noconf, don't read the file.

> as well as warn if unrecognized options are
> specified.

The old approach does that as well.

> +if (!GetOptions( \%prefs,

I think you don't need to repeat the options.
Doesn't this work?
if (!GetOptions(\%prefs)) {
die "$P: invalid argument - use --help if necessary\n";


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Florian Mickler on
On Wed, 12 May 2010 15:28:53 -0700
Joe Perches <joe(a)perches.com> wrote:

> On Wed, 2010-05-12 at 23:12 +0200, florian(a)mickler.org wrote:
> > This changes the syntax of the config-file introduced in the commit
> > "scripts/get_maintainer.pl: add .get_maintainer.conf default options
> > file".
> > Entries are now of the more commonly found form:
> > key = value
> > where keys are cmd-line arguments without the "--" prefixed.
>
> I don't have a strong opinion one way or another about the
> .conf file format.
>
> Another option which could be useful: --noconf, don't read the file.
>
> > as well as warn if unrecognized options are
> > specified.
>
> The old approach does that as well.

True.

>
> > +if (!GetOptions( \%prefs,
>
> I think you don't need to repeat the options.
> Doesn't this work?
> if (!GetOptions(\%prefs)) {
> die "$P: invalid argument - use --help if necessary\n";
>
No, GetOpts::Long needs a special markup for parsing the cmdline
string, like =s for specifying that that option is accompanied by a
string value or the ! for specifying that it is a flag.
Also there are aliases defined for config-options.

Cheers,
Flo

p.s.: maybe there is a GetOpts feature to use config-files?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Florian Mickler on
Hi Andrew!

What's the status of this patch?
Do you take it, or do you have an issue with it? This is a clear
improvement in my opinion.

cheers,
Flo

On Thu, 13 May 2010 09:56:52 +0200
Florian Mickler <florian(a)mickler.org> wrote:

> On Wed, 12 May 2010 15:28:53 -0700
> Joe Perches <joe(a)perches.com> wrote:
>
> > On Wed, 2010-05-12 at 23:12 +0200, florian(a)mickler.org wrote:
> > > This changes the syntax of the config-file introduced in the commit
> > > "scripts/get_maintainer.pl: add .get_maintainer.conf default options
> > > file".
> > > Entries are now of the more commonly found form:
> > > key = value
> > > where keys are cmd-line arguments without the "--" prefixed.
> >
> > I don't have a strong opinion one way or another about the
> > .conf file format.
> >
> > Another option which could be useful: --noconf, don't read the file.
> >
> > > as well as warn if unrecognized options are
> > > specified.
> >
> > The old approach does that as well.
>
> True.
>
> >
> > > +if (!GetOptions( \%prefs,
> >
> > I think you don't need to repeat the options.
> > Doesn't this work?
> > if (!GetOptions(\%prefs)) {
> > die "$P: invalid argument - use --help if necessary\n";
> >
> No, GetOpts::Long needs a special markup for parsing the cmdline
> string, like =s for specifying that that option is accompanied by a
> string value or the ! for specifying that it is a flag.
> Also there are aliases defined for config-options.
>
> Cheers,
> Flo

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Andrew Morton on
On Thu, 20 May 2010 08:46:15 +0200
Florian Mickler <florian(a)mickler.org> wrote:

> On Thu, 13 May 2010 09:56:52 +0200
> Florian Mickler <florian(a)mickler.org> wrote:
>
> > On Wed, 12 May 2010 15:28:53 -0700
> > Joe Perches <joe(a)perches.com> wrote:
> >
> > > On Wed, 2010-05-12 at 23:12 +0200, florian(a)mickler.org wrote:
> > > > This changes the syntax of the config-file introduced in the commit
> > > > "scripts/get_maintainer.pl: add .get_maintainer.conf default options
> > > > file".
> > > > Entries are now of the more commonly found form:
> > > > key = value
> > > > where keys are cmd-line arguments without the "--" prefixed.
> > >
> > > I don't have a strong opinion one way or another about the
> > > .conf file format.
> > >
> > > Another option which could be useful: --noconf, don't read the file.
> > >
> > > > as well as warn if unrecognized options are
> > > > specified.
> > >
> > > The old approach does that as well.
> >
> > True.
> >
> > >
> > > > +if (!GetOptions( \%prefs,
> > >
> > > I think you don't need to repeat the options.
> > > Doesn't this work?
> > > if (!GetOptions(\%prefs)) {
> > > die "$P: invalid argument - use --help if necessary\n";
> > >
> > No, GetOpts::Long needs a special markup for parsing the cmdline
> > string, like =s for specifying that that option is accompanied by a
> > string value or the ! for specifying that it is a flag.
> > Also there are aliases defined for config-options.
> >
>
> Hi Andrew!
>
> What's the status of this patch?
> Do you take it, or do you have an issue with it? This is a clear
> improvement in my opinion.
>

(top-posting repaired)

Joe didn't sound very excited about it.

If we're going to do this, we should hurry up, please - it'd be silly
to introduce a config file and then change its format shortly
afterwards.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Joe Perches on
On Fri, 2010-05-21 at 13:13 -0700, Andrew Morton wrote:
> On Thu, 20 May 2010 08:46:15 +0200
> Florian Mickler <florian(a)mickler.org> wrote:
> > What's the status of this patch?
> > Do you take it, or do you have an issue with it? This is a clear
> > improvement in my opinion.
> Joe didn't sound very excited about it.
> If we're going to do this, we should hurry up, please - it'd be silly
> to introduce a config file and then change its format shortly
> afterwards.

If an ".ini" style config is used, I think it'd be better to
put this stuff in .git/config under a proper section so that
any checking style script (checkpatch, smatch, smpl, etc)
has a standard place to put stuff.

I think what I posted requires less overall work and doesn't
need updating every time a new option is added, but overall
the capability isn't all that necessary.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
 |  Next  |  Last
Pages: 1 2
Prev: Linux 2.6.33.4
Next: system locks up when CD burn fails