Re: [PATCH 09/10] tree: stop using the_repository
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Jan 12, 2026, 15:00 UTC
- Message-ID
- <aWUMn6G0C1cHA4qY@pks.im>
- In-Reply-To
- <xmqqh5sqoqr0.fsf@gitster.g>
On Mon, Jan 12, 2026 at 06:22:11AM -0800, Junio C Hamano wrote:
Show 20 quoted lines
> Patrick Steinhardt <ps@pks.im> writes: > > > On Fri, Jan 09, 2026 at 10:30:20PM +0100, René Scharfe wrote: > >> Push the use of the_repository to the remaining callers by turning the > >> compatibility wrappers into macros, whose use still requires > >> USE_THE_REPOSITORY_VARIABLE to be defined. > > > > Can't we make this step a bit more explicit by adapting all callers to > > parse `repo_parse_tree()` with `the_repository`? That makes it way more > > obvious that we rely on the global repository. > > > > Edit: I see that you _do_ edit all callsites in the next commit, nice. > > > > In any case, I'd propose to move the compatibility macros into a section > > that says something like: > > > > /* Deprecated wrappers that will be removed once Git 2.53 is released. */ > > Please do not take release schedule hostage to one particular fix-up > series of patches. Thanks.
The intent isn't really to take anything hostage. It's rather intended as a hint that once a specific event has happened, we should take another look at removing these wrappers.
We regularly have the case that we add compatibility wrappers to not break in-flight patch series. We then have to wait a bit before we can remove those wrappers, which makes it likely that we forget doing so. By having the above marker we basically crowdsource their removal as everyone passing by the comment will now wonder "Wait, we already have Git 2.67, why do these wrappers still exist?".
Patrick