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

Re: [PATCH] multi-pack-index: simplify handling of unknown --options

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 10, 2022, 21:54 UTC
Message-ID
<xmqq1qusr5u9.fsf@gitster.g>
In-Reply-To
<20220710151645.GA2038@szeder.dev>
SZEDER Gábor <szeder.dev@gmail.com> writes:
Show 10 quoted lines
>> > Let parse_options() handle unknown options instead, which, besides
>> > simpler code, has the additional benefit that it prints not only the
>> > usage but an "error: unknown option `foo'" message as well.
>> 
>> Yes, I agree that getting rid of KEEP_UNKNOWN is a very good idea
>> for this reason.  But I suspect that we still need the "did we get
>> an extra argument we do not know what to do with?" check.
>
> Uh, indeed.  I got too trigger-happy with deleting lines.
> Updated patch below.

OK. I suspect that a test would have caught the breakage in the original. Would it make sense to add one now?

Thanks, will queue.
Previous: Ævar Arnfjörð Bjarmason
Message 5 of 5 in “multi-pack-index: simplify handling of unknown --options”
  1. multi-pack-index: simplify handling of unknown --optionsSZEDER Gábor, Jul 8, 2022
  2. Junio C HamanoJul 8, 2022
  3. SZEDER GáborJul 10, 2022
  4. Ævar Arnfjörð BjarmasonJul 10, 2022
  5. Junio C HamanoJul 10, 2022

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.