]> git.ipfire.org Git - thirdparty/git.git/commit
refs: protect against chicken-and-egg recursion
authorPatrick Steinhardt <ps@pks.im>
Thu, 25 Jun 2026 09:20:09 +0000 (11:20 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 26 Jun 2026 15:27:19 +0000 (08:27 -0700)
commitd6522d01dfd147d18246d308dd6ea24b32d095d2
treef8c903355932c46c7032a287449f88be6edaffdb
parent79fa75d499d767540fae8d85ab62391cae6591f9
refs: protect against chicken-and-egg recursion

In the preceding commits we have fixed recursion when creating the
reference backends due to a chicken-and-egg situation with "onbranch"
conditions. Unfortunately, this issue has existed for a while, and we
didn't really have a good mechanism to detect this recursion.

Improve the status quo by detecting the recursion when creating the main
reference store.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c