Re: [PATCH v3 2/2] bisect: add --reset-when-found to leave when done

Junio C Hamano <[email protected]>
Newsgroups org.kernel.vger.git
Message-ID <[email protected]>
Johannes Sixt <[email protected]> writes:

> 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.