[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: Re: [PATCH 2/3] doc-diff: add --clean mode to remove temporary working gunk
From: Eric Sunshine <sunshine () sunshineco ! com>
Date: 2018-08-31 21:24:21
Message-ID: CAPig+cRoOYZaDU-bPeCpabLVY3MiZwyE-Afc2AMZk7ksyj3tTQ () mail ! gmail ! com
[Download RAW message or body]
On Fri, Aug 31, 2018 at 4:01 PM Jeff King <peff@peff.net> wrote:
> On Fri, Aug 31, 2018 at 02:33:17AM -0400, Eric Sunshine wrote:
> > OPTIONS_SPEC="\
> > doc-diff [options] <from> <to> [-- <diff-options>]
> > +doc-diff (-c|--clean)
> > --
> > j=n parallel argument to pass to make
> > f force rebuild; do not rely on cached results
> > +c,clean cleanup temporary working files
> > "
>
> This will cause parseopt to normalize "--clean" to "-c" (along with
> "--cle", etc).
Good to know. The documentation for git-sh-setup didn't talk about
that at all, and while git-rev-parse documentation says that it
"normalizes" options, that word didn't really convey this specific
meaning to me, so I missed it.
> > while test $# -gt 0
> > do
> > case "$1" in
> > -j)
> > parallel=$2; shift ;;
> > + -c|--clean)
> > + clean=t ;;
>
> So this part can just test for "-c". AFAICT this is how "rev-parse
> --parseopt" has always worked, though the documentation is quite
> unclear. Other scripts seem to also use these redundant long options.
> I'm not opposed to including it as a defensive measure (or simply an
> annotation for the reader).
I'm fine leaving it as-is too since it seems that every other client
of git-sh-setup does the same (and to save a re-roll).
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic