`filesystem.ObjectStorage` does not see packs added after its index was loaded
Author: silverwindCreated Sep 29, 2026Updated Sep 29, 2026
ObjectStorage loads its pack index once, so objects in packs that git writes later return plumbing.ErrObjectNotFound until Reindex() is called. Git instead re-scans objects/pack on a miss. Affects v5.19.2 and v6.0.0-alpha.5.
git.PlainOpena repo andCommitObjecta packed commit, which loads the index.- Run
git -c transfer.fsckObjects=true fetch <remote> <ref>, which always writes a pack. CommitObjectof the fetched commit fails, while a reopened repo finds it.
Related: https://github.com/go-git/go-git/issues/1623
Issue written by Claude Opus 5.5.
Source: go-git/go-git