git_operations: heal a prior --depth=1 shallow metadata branch

main

Commit

Soph3mo ago

Dropping --depth=1 stops creating new shallow boundaries, but a repo that an older CLI already shallowed keeps the metadata tip grafted in .git/shallow forever — so its merge-base disconnection checks stay broken until something unshallows it.

Set Unshallow:true on the metadata fetch. remote.Fetch only adds --unshallow when the repo is actually shallow, so this is a no-op on a normally-cloned repo and only does work where a prior shallow boundary needs removing. --unshallow fetches the missing ancestry, so the repo becomes genuinely complete (not a "claims complete but missing objects" state) and composes with --filter=blob:none.

Add TestFetchMetadataTreeOnly_HealsPriorShallow (and extract the shared seed+clone setup into a helper). Update the now-stale FetchMetadataBranch comment that said it never unshallows.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: 1b1d826bd5d5

Checkpoints

so in ../entiredb "filtered_fetches" is enabled, now today one of my coworkers had this issue:

Claude Code
View session
Checkpoint 1