From: Pierre Habouzit Date: Sat, 26 Jan 2008 10:42:16 GMT Subject: Re: [PATCH] Check for -amend as a common wrong usage of --amend. Message-ID: <20080126104216.GA13922@artemis.madism.org> In-Reply-To: <7vd4rp3y6e.fsf@gitster.siamese.dyndns.org> On Sat, Jan 26, 2008 at 06:20:41AM +0000, Junio C Hamano wrote: > Joey Hess writes: > > > Some option parsers avoid this sort of ambiguity by not allowing short > > options that take a string to be bundled in the same word with other > > short options. > > > > So, for example, git-commit -am would not be allowed, while > > git-commit -a -m and perhaps git-commit -am would be allowed. > > > > There could still be problems if there were a --mend option that could > > be typoed as -mend. > > > > I don't know enough about compatability to say if this would work for git. > > Yeah, I think that is quite a sensible workaround. I agree, I think that we should refuse things where the string after a /one/ dash starts with 3 or more consecutive characters that are also the beginning of a long option. I think that 2 is usually a bit "short" to assume that it's a typo. I'll provide a patch soon -- ·O· Pierre Habouzit ··O madcoder@debian.org OOO http://www.madism.org