fangorn/ex_git_objectstore
public
ref:main
Implement repack / pack maintenance #13
open
Opened by cole.christensen@gmail.com
Links
No links yet.
Problem
No mechanism to consolidate loose objects into packfiles or to repack existing packfiles into fewer, more efficient ones. Over time, repositories accumulate many small packs and loose objects.
Impact
- Object lookup degrades as pack count increases (linear scan over packs)
- Storage fragmentation on filesystem and S3
- No way to optimize repository after many pushes
Acceptance Criteria
-
repackoperation: collect loose objects into a new packfile - Option to consolidate multiple packs into one
- Removes loose objects that are now in a pack
- Removes old packs that have been consolidated
- Atomic: old packs not deleted until new pack is verified
- Works across all storage backends
- Tests covering: loose → pack, multi-pack consolidation, concurrent access safety