]> git.ipfire.org Git - thirdparty/git.git/commit - remote.c
remote: move static variables into per-repository struct
authorGlen Choo <chooglen@google.com>
Thu, 18 Nov 2021 00:53:22 +0000 (16:53 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Nov 2021 06:31:19 +0000 (22:31 -0800)
commitfd3cb0501e175bcac042587cb7bb75e16034a5b7
tree50bb4343708d25a77d2c57d575691634f47088a5
parente083ef5d54707a4bb855e8ac6f6ee0576a020349
remote: move static variables into per-repository struct

remote.c does not works with non-the_repository because it stores its
state as static variables. To support non-the_repository, we can use a
per-repository struct for the remotes subsystem.

Prepare for this change by defining a struct remote_state that holds
the remotes subsystem state and move the static variables of remote.c
into the_repository->remote_state.

This introduces no behavioral or API changes.

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
remote.h
repository.c
repository.h