From 64a741619d27ede27788d2d444257635f4af8ffd Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Wed, 11 Apr 2018 17:21:14 -0700 Subject: refs: store the main ref store inside the repository struct This moves the 'main_ref_store', which was a global variable in refs.c into the repository struct. This patch does not deal with the parts in the refs subsystem which deal with the submodules there. A later patch needs to get rid of the submodule exposure in the refs API, such as 'get_submodule_ref_store(path)'. Acked-by: Michael Haggerty Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- refs.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'refs.h') diff --git a/refs.h b/refs.h index ab3d2bec2f..f5ab68c0ed 100644 --- a/refs.h +++ b/refs.h @@ -760,9 +760,7 @@ int reflog_expire(const char *refname, const struct object_id *oid, int ref_storage_backend_exists(const char *name); -#define get_main_ref_store(r) \ - get_main_ref_store_##r() -struct ref_store *get_main_ref_store_the_repository(void); +struct ref_store *get_main_ref_store(struct repository *r); /* * Return the ref_store instance for the specified submodule. For the * main repository, use submodule==NULL; such a call cannot fail. For -- cgit v1.2.3