]> git.99rst.org Git - git.git/commit
connected: split out promisor-based connectivity check
authorPatrick Steinhardt <redacted>
Thu, 25 Jun 2026 09:57:41 +0000 (11:57 +0200)
committerJunio C Hamano <redacted>
Thu, 25 Jun 2026 20:20:20 +0000 (13:20 -0700)
commit0a7f3389f4c16da05a1113ef0829a352af62dcbe
treed2ba0bb1439b7d5c56aa4f12084b55159229937e
parent8ed957112de135f449698e9408f2582eabb9401e
connected: split out promisor-based connectivity check

When performing a connectivity check in a partial clone we try to avoid
doing the connectivity check by checking whether all new tips are part
of a promisor pack. This makes use of the fact that we don't expect full
connectivity for promised objects anyway, so it's basically fine if
those objects are not fully connected.

The logic that handles this promisor-based check is somewhat hard to
read though as it uses nested loops and gotos. Pull it out into a
standalone function, which makes it a bit easier to reason about.

We'll also further simplify the function in the next commit.

Suggested-by: Christian Couder <redacted>
Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
connected.c
git clone https://git.99rst.org/PROJECT