Daniel Zoghalchali reports a regression in Git 2.56.0. A fetch that combines a tree filter with --unshallow (or --deepen) aborts in a non-partial shallow clone when the fetched ref has moved past the local tip.

The failure is an assertion in builtin/pack-objects.c: "should_include_obj should only be called on existing objects". pack-objects then dies with signal 6, followed by "could not finish pack-objects to repack local links" and "index-pack failed". The report's subject line ties the crash to an inherited GIT_SHALLOW_FILE.

Zoghalchali says v2.55.0 completes the same fetch. His team hit the problem in CI, where a job checks out a single commit at depth 1 and then unshallows its branch, which by then has moved on.

The report includes an offline reproduction script that works on any Linux system. It builds a small seed repository and then runs the filtered unshallow fetch.

No one has replied in the excerpts available. The cause has not been diagnosed on the list, and no fix has been proposed.