From: Shreyansh Paliwal Date: Sun, 29 Mar 2026 09:54:53 GMT Subject: Re: [PATCH v2 5/5] refs/packed-backend: use ref_store->repo instead of the_repository Message-ID: In-Reply-To: On Sat, Mar 28, 2026 at 10:38 PM Tian Yuchen wrote: > > On 3/28/26 22:09, Shreyansh Paliwal wrote: > > 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 > > --- > > 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; > > Burak already pointed out the issue with the static keyword in patch 3 > of v1. Notice that it's here as well. Hi Yuchen, I have acknowledged this in a previous reply to Burak. As stated there, this is a valid issue and would require moving the config into repo-settings struct. In this patch, I focused on removing the dependency on 'the_repository' while preserving existing behavior. Global state removal and multi-repo correctness is an incremental process, so I would prefer to handle this in a follow-up change. I'll also update the patch title in the next version to better reflect the scope of the change. Btw, I forgot to cc the other recipients previously, so it might have ended in your inbox twice :) Thanks, Shreyansh