From: Shreyansh Paliwal Date: Sat, 28 Mar 2026 12:51:58 GMT Subject: Re: [PATCH 2/5] refs: make get_files_ref_lock_timeout_ms() repostory aware Message-ID: In-Reply-To: On Fri, Mar 27, 2026 at 2:54 PM Burak Kaan Karaçay wrote: > > On Wed Mar 25, 2026 at 7:44 PM +03, Shreyansh Paliwal wrote: > > -long get_files_ref_lock_timeout_ms(void) > > +long get_files_ref_lock_timeout_ms(struct repository *repo) > > { > > static int configured = 0; > > > > @@ -998,7 +998,7 @@ long get_files_ref_lock_timeout_ms(void) > > static int timeout_ms = 100; > > > > if (!configured) { > > - repo_config_get_int(the_repository, "core.filesreflocktimeout", &timeout_ms); > > + repo_config_get_int(repo, "core.filesreflocktimeout", &timeout_ms); > > configured = 1; > > } > > > > Looks like the existing code uses static local variables for > performance. They can behave unexpectedly in multi-repo cases. > > I think moving the config into 'repo-settings' should be considered. The > config is already lazy-parsed, migrating it shouldn't be a problem. Yup, I agree that would be a logical change. We can take that up in a follow-up patch to this. Thanks.