#2439·go-git

`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.

  1. git.PlainOpen a repo and CommitObject a packed commit, which loads the index.
  2. Run git -c transfer.fsckObjects=true fetch <remote> <ref>, which always writes a pack.
  3. CommitObject of 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.