All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Buchacher <drizzd@aon.at>
To: Jeff King <peff@peff.net>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	"Shawn O. Pearce" <spearce@spearce.org>,
	git@vger.kernel.org
Subject: Re: [PATCH 2/2] allow mangling short options which take integer arguments
Date: Sat, 3 Oct 2009 11:23:32 +0200	[thread overview]
Message-ID: <20091003092332.GA10570@localhost> (raw)
In-Reply-To: <20091002075012.GB27664@coredump.intra.peff.net>

On Fri, Oct 02, 2009 at 03:50:12AM -0400, Jeff King wrote:

> On Fri, Oct 02, 2009 at 09:43:17AM +0200, Clemens Buchacher wrote:
> 
> > On Thu, Oct 01, 2009 at 11:55:03PM +0200, Johannes Schindelin wrote:
> > 
> > > And this patch looks even more straight-forward than 1/2, _but_... what 
> > > about cases where there are short options that are digits?
> > 
> > Could you point me to one of those? I did not find any during my
> > non-exhaustive search. We should be able to handle them easily by adding
> > PARSE_OPT_MANY.
> 
> The one that comes readily to mind is "git log -1", but that is actually
> parsed by the revision options parser, which doesn't use parseopt. But
> there are a few done by parseopt:
> 
>   $ git grep "OPT_.*'[0-9]'"
>   archive.c:              OPT__COMPR('1', &compression_level, "compress faster", 1),
>   archive.c:              OPT__COMPR_HIDDEN('2', &compression_level, 2),
>   archive.c:              OPT__COMPR_HIDDEN('3', &compression_level, 3),
>   archive.c:              OPT__COMPR_HIDDEN('4', &compression_level, 4),
>   archive.c:              OPT__COMPR_HIDDEN('5', &compression_level, 5),
>   archive.c:              OPT__COMPR_HIDDEN('6', &compression_level, 6),
>   archive.c:              OPT__COMPR_HIDDEN('7', &compression_level, 7),
>   archive.c:              OPT__COMPR_HIDDEN('8', &compression_level, 8),
>   archive.c:              OPT__COMPR('9', &compression_level, "compress better", 9),
>   builtin-checkout.c:             OPT_SET_INT('2', "ours", &opts.writeout_stage, "stage",
>   builtin-checkout.c:             OPT_SET_INT('3', "theirs", &opts.writeout_stage, "stage",

Those are not affected by this patch series. They can be cuddled with other
short options just like before, since they don't take arguments.

  parent reply	other threads:[~2009-10-03  9:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-25 23:32 how optparse can go horribly wrong Shawn O. Pearce
2009-09-26  1:51 ` Nicolas Sebrecht
2009-09-26 13:44   ` Sverre Rabbelier
2009-09-26 19:25     ` Shawn O. Pearce
2009-09-28 13:37       ` Clemens Buchacher
2009-10-01 20:16 ` [PATCH 1/2] do not mangle short options which take arguments Clemens Buchacher
2009-10-01 20:23   ` [PATCH 2/2] allow mangling short options which take integer arguments Clemens Buchacher
2009-10-01 21:55     ` Johannes Schindelin
2009-10-02  7:43       ` Clemens Buchacher
2009-10-02  7:50         ` Jeff King
2009-10-02  8:26           ` Clemens Buchacher
2009-10-02  8:41             ` Johannes Schindelin
2009-10-03  9:23           ` Clemens Buchacher [this message]
2009-10-01 21:53   ` [PATCH 1/2] do not mangle short options which take arguments Johannes Schindelin
2009-10-02  6:11   ` Jeff King
2009-10-02  7:36     ` Clemens Buchacher
2009-10-02  7:46       ` Paolo Bonzini
2009-10-02  7:57       ` Jeff King
2009-10-02  8:42       ` Johannes Schindelin
2009-10-02  8:43         ` Jeff King
2009-10-02  9:04           ` Johannes Schindelin

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=20091003092332.GA10570@localhost \
    --to=drizzd@aon.at \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=spearce@spearce.org \
    /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.