Skip to content

pr-2333/kairosci/attilio/pack-objects-missing-promisor-v4

tagged this 25 Nov 23:22
From: Alessio Attilio <attilio.alessio@protonmail.com>

During a filtered fetch in a partial clone, index-pack --promisor
re-packs local links from the incoming pack into promisor packs. It
invokes pack-objects with --exclude-promisor-objects-best-effort to
skip links already stored in promisor packs. After a filtered
--unshallow or --deepen, this walk can encounter a promisor commit
whose tree is missing. The object-info lookup then hits a BUG and the
fetch fails.

Do not lazy-fetch while checking these links: this is a best-effort
repack, not a request to retrieve missing objects. If the object is
missing, pack-objects cannot include it, so treat it like an object
already in a promisor pack and continue. This callback is used only by
the best-effort repack started for an incoming promisor pack, whose
output is itself marked promisor. If the missing object was not
actually promised, this still cannot discard available data; the
object was already absent and any later access would fail unless the
promisor remote can provide it.

Test filtered --unshallow and --deepen fetches, as well as a subsequent
fetch that repacks links to promisor commits with missing trees.

Signed-off-by: Alessio Attilio <attilio.alessio@protonmail.com>

Submitted-As: https://lore.kernel.org/git/pull.2333.v4.git.1795648951606.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.2333.git.1795635624820.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.2333.v2.git.1795636170423.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.2333.v3.git.1795648282594.gitgitgadget@gmail.com
Assets 2
Loading