From: Felipe Contreras Date: Sat, 14 Mar 2009 21:34:55 GMT Subject: Re: [PATCH] config: --replace-all with one argument exits properly with a better message. Message-ID: <94a0d4530903141434w2fb8aa28we087465482a12e41@mail.gmail.com> In-Reply-To: <7vtz5vakrp.fsf@gitster.siamese.dyndns.org> On Sat, Mar 14, 2009 at 10:53 PM, Junio C Hamano wrote: > Carlos Rica writes: > >> 'config --replace-all ONE_ARG' was being treated as 'config NAME VALUE', >> showing the error "key does not contain a section: --replace-all". > > Hmm, I am getting "error: wrong number of arguments" followed by the long > and somewhat annoying "usage" from the parseopt table dump. If you find it annoying why don't you remove the usage? > Ahh, that is because I am running the version from 'next', which contains > the fc/parseopt-config topic that rewrites the option parser and error > checking almost completely. > > Can you work with Felipe to see if this is still needed, or needs to be > fixed in a different way?  It could be that your tests may already pass > over there on 'next'.  I didn't check. The new code is already checking correctly that --replace-all needs at least two arguments. However, the "usage" is incorrect and of course the test will come in handy. Cheers. -- Felipe Contreras