From: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org, Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
Subject: Re: how optparse can go horribly wrong
Date: Sat, 26 Sep 2009 03:51:27 +0200 [thread overview]
Message-ID: <20090926015127.GA12994@vidovic> (raw)
In-Reply-To: <20090925233226.GC14660@spearce.org>
The 25/09/09, Shawn O. Pearce wrote:
> *sigh*. Someone just ran into this today:
>
> $ git commit -a -ammend
> [work ce38944] mend
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> Omit one - and include an extra 'm', and instead of --amend you
> have -a -m mend. Which isn't exactly what you wanted.
>
> We do catch -amend with an error though:
>
> $ git commit -amend
> error: did you mean `--amend` (with two dashes ?)
OTOH, this is a bit odd because a commit with the message "end" makes
perfect sense for a "fast and crappy commit local workflow".
And we allow -ammend (with two 'm')
$ git commit -ammend
[next 101f014] mend
1 files changed, 1 insertions(+), 0 deletions(-)
$
> I wonder, should the -m flag on commit not allow cuddling its
> value against the switch when its combined in short form with
> other switches?
Doing this only to -m flag would break consistency. That said, I don't
have any opinion in disallowing the sticked form for _all_ short
options.
--
Nicolas Sebrecht
next prev parent reply other threads:[~2009-09-26 1:51 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 [this message]
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
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=20090926015127.GA12994@vidovic \
--to=nicolas.s.dev@gmx.fr \
--cc=git@vger.kernel.org \
--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.