Subject: Re: how optparse can go horribly wrong

From: "Shawn O. Pearce" <[email-masked]>
Date: Sat, 26 Sep 2009 12:25:27 -0700

Sverre Rabbelier <[email-masked]> wrote:
> On Sat, Sep 26, 2009 at 03:51, Nicolas Sebrecht <[email-masked]> wrote:
> > 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.
> 
> Perhaps instead disallow it for short options that do not take a
> one-symbol argument, that is -n4 makes a lot of sense to me, but -m"my
> commit message here" not so much.

-1 on that, because long, long, long ago when I worked on -m support
for commit I remember insisting that -mfoo and -m foo should be
the same.  I often do `git commit -a -mwip` or something to save my
branch state and come back later.

What I think we should do is not allow cuddling of short options
when the final option takes more than 1 character worth of argument.
Thus `git commit -a -mfoo` is OK, but `git commit -amfoo` is not.

-- 
Shawn.