Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlen Choo <chooglen@google.com>2021-11-18 03:53:22 +0300
committerJunio C Hamano <gitster@pobox.com>2021-11-19 09:31:19 +0300
commitfd3cb0501e175bcac042587cb7bb75e16034a5b7 (patch)
tree50bb4343708d25a77d2c57d575691634f47088a5 /repository.h
parente083ef5d54707a4bb855e8ac6f6ee0576a020349 (diff)
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>
Diffstat (limited to 'repository.h')
-rw-r--r--repository.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/repository.h b/repository.h
index a057653981..98f9583470 100644
--- a/repository.h
+++ b/repository.h
@@ -11,6 +11,7 @@ struct pathspec;
struct raw_object_store;
struct submodule_cache;
struct promisor_remote_config;
+struct remote_state;
enum untracked_cache_setting {
UNTRACKED_CACHE_KEEP,
@@ -127,6 +128,9 @@ struct repository {
*/
struct index_state *index;
+ /* Repository's remotes and associated structures. */
+ struct remote_state *remote_state;
+
/* Repository's current hash algorithm, as serialized on disk. */
const struct git_hash_algo *hash_algo;