Subject: Re: [RFC PATCH 1/2] remote: move remote group resolution to remote.c

From: Junio C Hamano <[email-masked]>
Date: Fri, 06 Mar 2026 10:12:14 -0800

Usman Akinyemi <[email-masked]> writes:

> diff --git a/remote.h b/remote.h
> index fc052945ee..fa38f951a2 100644
> --- a/remote.h
> +++ b/remote.h
> @@ -347,6 +347,18 @@ int branch_has_merge_config(struct branch *branch);
>  
>  int branch_merge_matches(struct branch *, int n, const char *);
>  
> +/* list of the remote in a group as configured */
> +struct remote_group_data {
> +	const char *name;
> +	struct string_list *list;
> +};
> +
> +int get_remote_group(const char *key, const char *value,
> +			    const struct config_context *ctx UNUSED,
> +			    void *priv);

It is dubious to carry UNUESD over to an external declaration in a
public header file, unless it is a "static inline" definition that
comes with the implementation.

Other than that, move looks correct and it is generally a good idea.

When moving functions and types that have been private to the
implementation of a subsystem to public namespace, we need to be
careful to consider if the names of these things are specific
enough.  With "remote_group" in them, they are all good as-is in
this case, and can go public without giving them "better" names.

Thanks.