git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] config: --replace-all with one argument exits properly with a better message.

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Mar 15, 2009, 10:26 UTC
Message-ID
<94a0d4530903150326u34a0715v38269417e2785db8@mail.gmail.com>
In-Reply-To
<7vab7na6wb.fsf@gitster.siamese.dyndns.org>
On Sun, Mar 15, 2009 at 3:53 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> On Sat, Mar 14, 2009 at 10:53 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>> Carlos Rica <jasampler@gmail.com> 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?
>
> Because the primary target audience of the help text is not me?

Ok. I don't think it makes a big difference to leave it on or off. People not familiar with 'git config' might find it handy, but I admit that I also find it a bit annoying, mainly because the error message gets lost in the noise.

Show 11 quoted lines
>>> 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.
>
> So perhaps you can pick a part of it and send in an update to your
> parseoptification series?  I think the series is ready for 'master'
> sometime next week if not sooner.

Or maybe Carlos can beat me to do it since it seems he is interested. Otherwise yeah, I'll do it.

-- 
Felipe Contreras
Previous: Junio C HamanoNext: Carlos Rica
Message 5 of 7 in “config: --replace-all with one argument exits properly with a better message.”
  1. config: --replace-all with one argument exits properly with a better message.Carlos Rica, Mar 14, 2009
  2. Junio C HamanoMar 14, 2009
  3. Felipe ContrerasMar 14, 2009
  4. Junio C HamanoMar 15, 2009
  5. Felipe ContrerasMar 15, 2009
  6. Carlos RicaMar 16, 2009
  7. Felipe ContrerasMar 16, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.