From: Patrick Steinhardt Date: Fri, 12 Jun 2026 06:18:11 GMT Subject: Re: [PATCH 3/9] setup: don't apply "GIT_REFERENCE_BACKEND" without a repository Message-ID: In-Reply-To: On Wed, Jun 10, 2026 at 10:32:46AM -0700, Junio C Hamano wrote: > Patrick Steinhardt writes: > > > When discovering a repository we eventually also apply the > > "GIT_REFERENCE_BACKEND" environment variable to the repository. There's > > two problems with that: > > > > - We do this unconditionally, which is rather pointless: we really > > only have to configure the repository when we have found one. > > > > - We have already applied the repository format at that point in time, > > so we need to manually reapply it. > > Does the second point have a small typo, i.e., "if we have a > repository, we have already applied the ref backend to it when we > discovered it, so NO need to manually reapply"? No, this is correct as-is. At the point in time where we handle GIT_REFERENCE_BACKEND we have already discovered the repository format, applied it to the repository, configured the reference database format et al. So because we handle GIT_REFERENCE_BACKEND _after_ that whole dance we basically have to re-configure the reference database format, which is awkward. Patrick