Subject: Re: [PATCH v2 2/7] fetch: add --negotiation-restrict option

From: Derrick Stolee <[email-masked]>
Date: Mon, 20 Apr 2026 07:35:57 -0400

On 4/20/2026 6:32 AM, Junio C Hamano wrote:
> Derrick Stolee <[email-masked]> writes:
> 
>>>>   		OPT_STRING_LIST(0, "negotiation-tip", &negotiation_tip, N_("revision"),
>>>>   				N_("report that we have only objects reachable from this object")),
>>>> +		OPT_STRING_LIST(0, "negotiation-restrict", &negotiation_tip, N_("revision"),
>>>> +				N_("report that we have only objects reachable from this object")),
>>>
>>> Is OPT_ALIAS() suitable for this?
>>
>> I was not aware of this. Thanks for the pointer!
>>
>> I do plan to make "negotiation-tip" an alias for "negotiation-restrict"
>> based on the new preference for *-restrict as the "real" option now. Is
>> that the right way to do this?
> 
> Let's see.
...
> So
> 
> 	OPT_STRING_LIST(0, "negotiation-restrict", &negotiation_tip, ...),
> 	OPT_ALIAS(0, "negotiation-tip", "negotiation-restrict"),
> 
> would be the right combination in the correct order, I think.
> Mention the official thing first, and then tell that another thing
> is an alias to what the readers have already seen after that (e.g.,
> c28b036f (clone: reorder --recursive/--recurse-submodules,
> 2020-03-16)).

Thanks! This is indeed what I have in my local copy in preparation
for v3. It helps to have early confirmation about this.

-Stolee