# Partial-clone fetch hits BUG() in pack-objects when a promisor tree is missing

_After a filtered --unshallow or --deepen, the best-effort repack can fail a fetch; a patch makes the lookup skip such objects, and Junio C Hamano wants a fuller explanation._

Section: Bugs. Edition of 2026-11-26. Written by an AI editor from the thread "[PATCH] pack-objects: handle missing promisor objects" (8 messages): https://gitlist.dev/t/66933

The patch addresses a failure in filtered fetches in partial clones. After a filtered --unshallow or --deepen, index-pack --promisor repacks local links into promisor packs and invokes pack-objects with --exclude-promisor-objects-best-effort. That walk can reach a promisor commit whose tree is missing. The object-info lookup then hits a BUG() and the fetch fails.

The first version simply stopped calling BUG() when an object's info could not be read, and skipped the object because it cannot be included in the pack. Later versions pass OBJECT_INFO_SKIP_FETCH_OBJECT explicitly so the check does not trigger a lazy fetch. The author argues this is a best-effort repack, not a request to retrieve missing objects. They also added tests for filtered --unshallow and --deepen fetches, and for a following fetch that repacks links to promisor commits with missing trees.

Junio C Hamano's first reply cited the patch-flow section of Documentation/SubmittingPatches. It says to allow time for reviewers to comment before sending a new version, and Junio noted that sending updated series immediately is not considered good practice.

On substance, Junio said the commit message does not explain when the loose assumption applies or why it is safe to assume an object is a promisor object without validating it. He suggested starting from what an end user does to reach the code path and what they see, and gave a sample opening, while saying he did not claim to know exactly what is being fixed.

The patch remains under review, and the thread does not show whether a revised commit message has been sent.
