From: Christian Couder Date: Mon, 27 Apr 2026 12:42:38 GMT Subject: Re: [PATCH 09/16] promisor-remote: add 'local_name' to 'struct promisor_info' Message-ID: In-Reply-To: On Thu, Mar 26, 2026 at 1:21 PM Patrick Steinhardt wrote: > > On Mon, Mar 23, 2026 at 09:05:12AM +0100, Christian Couder wrote: > > In a following commit, we will store promisor remote information under > > a remote name different than the one the server advertised. > > > > To prepare for this change, let's add a new 'char* local_name' member > > Micronit: s/char* local_name/char *local_name/ Fixed in the v2 I just sent. > > diff --git a/promisor-remote.c b/promisor-remote.c > > index bdfc5e7608..da347fa2dc 100644 > > --- a/promisor-remote.c > > +++ b/promisor-remote.c > > @@ -434,15 +434,19 @@ static struct string_list *fields_stored(void) > > > > /* > > * Struct for promisor remotes involved in the "promisor-remote" > > - * protocol capability. > > + * protocol capability: > > * > > - * Except for "name", each in this struct and its > > - * should correspond (either on the client side or on the server side) > > - * to a "remote.." config variable set to where > > - * "" is a promisor remote name. > > + * - "name" is the name the server advertised. > > + * - "local_name" is the name we use locally (may be auto-generated). > > + * > > + * Except for "name" and "local_name", each in this struct > > + * and its should correspond (either on the client side or on > > + * the server side) to a "remote.." config variable set > > + * to where "" is a promisor remote name. > > */ > > struct promisor_info { > > const char *name; > > + const char *local_name; > > const char *url; > > const char *filter; > > const char *token; > > I think it would be easier to follow if the struct-level comment applied > to the general description of the struct, and individual members would > then have their own comments describing their intent. Right, the diff looks like the following in the v2: @@ -434,13 +434,14 @@ static struct string_list *fields_stored(void) * Struct for promisor remotes involved in the "promisor-remote" * protocol capability. * - * Except for "name", each in this struct and its - * should correspond (either on the client side or on the server side) - * to a "remote.." config variable set to where - * "" is a promisor remote name. + * Except for "name" and "local_name", each in this struct + * and its should correspond (either on the client side or on + * the server side) to a "remote.." config variable set + * to where "" is a promisor remote name. */ struct promisor_info { - const char *name; + const char *name; /* name the server advertised */ + const char *local_name; /* name used locally (may be auto-generated) */ const char *url; const char *filter; const char *token; Thanks.