Re: [PATCH 2/3] doc-diff: add --clean mode to remove temporary working gunk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 31, 2018 at 4:01 PM Jeff King <peff@xxxxxxxx> 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).



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux