remote: remove the_repository->remote_state from static methods
commit56eed3422cb4605a616daab589b94a843a75651f
authorGlen Choo <chooglen@google.com>
Thu, 18 Nov 2021 00:53:24 +0000 (17 16:53 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Nov 2021 06:31:19 +0000 (18 22:31 -0800)
treed5d1b15dc560e7d1f620abbcd5faab02d31917bd
parent085b98f6cdbe9ed794e19ded00ccd0431c30faa0
remote: remove the_repository->remote_state from static methods

Replace all remaining references of the_repository->remote_state in
static functions with a struct remote_state parameter.

To do so, move read_config() calls to non-static functions and create a
family of static functions, "remotes_*", that behave like "repo_*", but
accept struct remote_state instead of struct repository. In the case
where a static function calls a non-static function, replace the
non-static function with its "remotes_*" equivalent.

Signed-off-by: Glen Choo <chooglen@google.com>
Reviewed-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c