Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1262531 > unrolled thread

[PATCH v2 3/4] get_maintainer: add --no-foo options to --help

Started byBrian Norris <computersforpeace@gmail.com>
First post2015-11-04 20:30 +0100
Last post2015-11-04 22:00 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 3/4] get_maintainer: add --no-foo options to --help Brian Norris <computersforpeace@gmail.com> - 2015-11-04 20:30 +0100
    Re: [PATCH v2 3/4] get_maintainer: add --no-foo options to --help Joe Perches <joe@perches.com> - 2015-11-04 20:50 +0100
      Re: [PATCH v2 3/4] get_maintainer: add --no-foo options to --help Brian Norris <computersforpeace@gmail.com> - 2015-11-04 21:40 +0100
      Re: [PATCH v2 3/4] get_maintainer: add --no-foo options to --help Brian Norris <computersforpeace@gmail.com> - 2015-11-04 22:00 +0100

#1262531 — [PATCH v2 3/4] get_maintainer: add --no-foo options to --help

FromBrian Norris <computersforpeace@gmail.com>
Date2015-11-04 20:30 +0100
Subject[PATCH v2 3/4] get_maintainer: add --no-foo options to --help
Message-ID<qrbUR-4Bi-1@gated-at.bofh.it>
Many flag options are boolean and support both a positive and a negative
invocation from the command line. Some of these are even mentioned by
example (e.g., --nogit is mentioned as a default option), but they
aren't explicitly mentioned in the list of options. It happens that some
of these are pretty important, as they are default-on, and to turn them
off, you have to know about the --no-foo version.

Rather than clutter the whole help text with bracketed '--[no]foo',
let's just mention the general rule, a la 'man gcc'.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Joe Perches <joe@perches.com>
---
v1 -> v2:
  * don't clutter with --[no]foo bracketing; just include this note up front;
    suggested by Joe

v1:
  https://lkml.org/lkml/2015/8/19/441

 scripts/get_maintainer.pl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 6c307276f3d6..13115eab8992 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -770,6 +770,9 @@ usage: $P [options] patchfile
        $P [options] -f file|directory
 version: $V
 
+Most options have both positive and negative forms. The negative form of --foo
+is --nofoo.
+
 MAINTAINER field selection options:
   --email => print email address(es) if any
     --git => include recent git \*-by: signers
-- 
2.6.0.rc2.230.g3dd15c0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1262551

FromJoe Perches <joe@perches.com>
Date2015-11-04 20:50 +0100
Message-ID<qrcee-4Ne-19@gated-at.bofh.it>
In reply to#1262531
On Wed, 2015-11-04 at 11:28 -0800, Brian Norris wrote:
> Many flag options are boolean and support both a positive and a negative
> invocation from the command line. Some of these are even mentioned by
> example (e.g., --nogit is mentioned as a default option), but they
> aren't explicitly mentioned in the list of options. It happens that some
> of these are pretty important, as they are default-on, and to turn them
> off, you have to know about the --no-foo version.
[]
> v1 -> v2:
>   * don't clutter with --[no]foo bracketing; just include this note up front;
>     suggested by Joe
[]
> diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
[]
> @@ -770,6 +770,9 @@ usage: $P [options] patchfile
>         $P [options] -f file|directory
>  version: $V
>  
> +Most options have both positive and negative forms. The negative form of --foo
> +is --nofoo.
> +
>  MAINTAINER field selection options:
>    --email => print email address(es) if any
>      --git => include recent git \*-by: signers

Hey Brian.

Thanks for the series.

It all seems sensible except this should be below the
options instead of above it.  I would put it last in
the "Notes: " block just above the EOT marker.

I would have broken the lines like:

Most options have both positive and negative forms.
The negative forms for --<foo> are --no<foo> and --no-<foo>.

So, if you could please respin and resend the series with
that change, I'll ack it.

cheers, Joe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1262578

FromBrian Norris <computersforpeace@gmail.com>
Date2015-11-04 21:40 +0100
Message-ID<qrd0B-5kK-13@gated-at.bofh.it>
In reply to#1262551
On Wed, Nov 04, 2015 at 11:48:44AM -0800, Joe Perches wrote:
> On Wed, 2015-11-04 at 11:28 -0800, Brian Norris wrote:
> > Many flag options are boolean and support both a positive and a negative
> > invocation from the command line. Some of these are even mentioned by
> > example (e.g., --nogit is mentioned as a default option), but they
> > aren't explicitly mentioned in the list of options. It happens that some
> > of these are pretty important, as they are default-on, and to turn them
> > off, you have to know about the --no-foo version.
> []
> > v1 -> v2:
> >   * don't clutter with --[no]foo bracketing; just include this note up front;
> >     suggested by Joe
> []
> > diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
> []
> > @@ -770,6 +770,9 @@ usage: $P [options] patchfile
> >         $P [options] -f file|directory
> >  version: $V
> >  
> > +Most options have both positive and negative forms. The negative form of --foo
> > +is --nofoo.
> > +
> >  MAINTAINER field selection options:
> >    --email => print email address(es) if any
> >      --git => include recent git \*-by: signers
> 
> Hey Brian.
> 
> Thanks for the series.
> 
> It all seems sensible except this should be below the
> options instead of above it.  I would put it last in
> the "Notes: " block just above the EOT marker.

Oh, I completely overlooked the 'Notes' section when doing this :)
I was just imitating the placement in 'man gcc', where the note is in
the DESCSRIPTION, which comes before all the options. But your
suggestion does seem like a good place.

> I would have broken the lines like:
> 
> Most options have both positive and negative forms.
> The negative forms for --<foo> are --no<foo> and --no-<foo>.

OK, so in the Notes section, there's a form of second-line indentation,
so I guess this?

  Most options have both positive and negative forms.
      The negative forms for --<foo> are --no<foo> and --no-<foo>.

> So, if you could please respin and resend the series with
> that change, I'll ack it.

Will do shortly.

Regards,
Brian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1262595

FromBrian Norris <computersforpeace@gmail.com>
Date2015-11-04 22:00 +0100
Message-ID<qrdjY-5rI-29@gated-at.bofh.it>
In reply to#1262551
On Wed, Nov 04, 2015 at 11:48:44AM -0800, Joe Perches wrote:
> Most options have both positive and negative forms.
> The negative forms for --<foo> are --no<foo> and --no-<foo>.

I just noticed you included both --no<foo> and --no-<foo>. I didn't even
notice that Perl supported both variants here. Good thing the clueless
one is writing the documentation! :) Thanks again for the tips.

Brian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web