[PATCH 5/5] refs/packed-backend: use ref_store->repo instead of the_repository
- From
Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>
- Date
- Mar 25, 2026, 16:44 UTC
- Message-ID
- <20260325164833.1216577-6-shreyanshpaliwalcmsmn@gmail.com>
- In-Reply-To
- <20260325164833.1216577-1-shreyanshpaliwalcmsmn@gmail.com>
In refs/packed-backend.c, repo_config_get_int() is called using the global the_repository, even though a repository instance is available via struct ref_store.
Replace the use of the_repository with ref_store->repo to make the code explicitly repository-aware. With no remaining users of the_repository in this file, drop the USE_THE_REPOSITORY_VARIABLE macro.
Signed-off-by: Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com> --- refs/packed-backend.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/refs/packed-backend.c b/refs/packed-backend.c index 23ed62984b..ebc10dab4d 100644 --- a/refs/packed-backend.c +++ b/refs/packed-backend.c @@ -1,4 +1,3 @@ -#define USE_THE_REPOSITORY_VARIABLE #define DISABLE_SIGN_COMPARE_WARNINGS #include "../git-compat-util.h" @@ -1223,7 +1222,7 @@ int packed_refs_lock(struct ref_store *ref_store, int flags, struct strbuf *err) static int timeout_value = 1000; if (!timeout_configured) { - repo_config_get_int(the_repository, "core.packedrefstimeout", &timeout_value); + repo_config_get_int(ref_store->repo, "core.packedrefstimeout", &timeout_value); timeout_configured = 1; }
-- 2.53.0