Re: [PATCH v2 06/10] parse-options: mark unused "opt" parameter in callbacks
- From
René Scharfe <l.s.r@web.de>
- Date
- Sep 19, 2023, 07:42 UTC
- Message-ID
- <3c3960cf-155c-4129-913e-31db45671eef@web.de>
- In-Reply-To
- <20230905070512.GC199565@coredump.intra.peff.net>
Am 05.09.23 um 09:05 schrieb Jeff King:
Show 6 quoted lines
> On Sat, Sep 02, 2023 at 12:12:56PM +0200, René Scharfe wrote: > >> And I don't understand why the callback returns 1 (PARSE_OPT_NON_OPTION) >> on error, but that's a different matter. > > Yeah, that doesn't make sense at all.
Actually it does: any non-zero return from a callback is interpreted as an error. "return error(...);" would be shorter, but "error(...); return 1;" is not wrong. Sorry for the noise!
René