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.