From: Christian Couder Date: Wed, 27 May 2026 15:33:40 GMT Subject: Re: [PATCH v3 4/8] promisor-remote: add 'local_name' to 'struct promisor_info' Message-ID: In-Reply-To: <87a4tvq6pr.fsf@gitster.g> On Wed, May 20, 2026 at 2:12 AM Junio C Hamano wrote: > > Christian Couder writes: > > +static const char *promisor_info_internal_name(struct promisor_info *p) > > +{ > > + return p->local_name ? p->local_name : p->name; > > +} > > Hmph. > > > @@ -829,7 +836,7 @@ static bool promisor_store_advertised_fields(struct promisor_info *advertised, > > { > > struct promisor_info *p; > > struct string_list_item *item; > > - const char *remote_name = advertised->name; > > + const char *remote_name = promisor_info_internal_name(advertised); > > Is this really a "remote_name", though? As ... > > > @@ -937,7 +944,8 @@ static void filter_promisor_remote(struct repository *repo, > > /* Apply accepted remotes to the stable repo state */ > > for_each_string_list_item(item, accepted_remotes) { > > struct promisor_info *info = item->util; > > - struct promisor_remote *r = repo_promisor_remote_find(repo, info->name); > > + const char *local = promisor_info_internal_name(info); > > ... this name "local" is "the name the thing is locally known to > us", promisor_info_local_name() might be a better name? I dunno. > I jsut found it odd that the return value of the same function is > stored in variables named "remote" and "local" at the same time ;-) In the v4 I just sent, I renamed promisor_info_internal_name() to promisor_info_local_name(), and "remote_name" is the name of the local variable in both places to be more consistent. Thanks.