Re: [PATCH v3 2/2] bisect: add --reset-when-found to leave when done
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 23, 2026, 14:27 UTC
- Message-ID
- <xmqq33x9n5ms.fsf@gitster.g>
- In-Reply-To
- <faa22968-54ac-4e4f-8324-3326ffb00c5b@kdbg.org>
Johannes Sixt <j6t@kdbg.org> writes:
Show 12 quoted lines
> Am 20.07.26 um 11:10 schrieb Harald Nordgren via GitGitGadget:
>> @@ -784,6 +859,10 @@ static enum bisect_error bisect_start(struct bisect_terms *terms, int argc,
>> break;
>> }
>> }
>> + if (reset_when_found != RESET_WHEN_FOUND_NONE && no_checkout) {
>> + res = error(_("'--reset-when-found' cannot be used with '--no-checkout'"));
>
> We have a boilerplate text for this kind of error that saves a translation:
>
> res = error(_("options '%s' and '%s' cannot be used together"),
> "--reset-when-found", "--no-checkout");I wonder if we should add a set of helper functions that return an error instead of dying, to complement the die_for_incompatible_optX() family of functions.
Are there many other places that would benefit from this?
Thanks.