Start using geometric repacking
With the recent rollout of multi-pack-indices and cruft packs we can finally start using geometric repacking in the context of repository housekeeping. Geometric repacking is a more efficient mode of repacking packfiles, more information can be found in this great blog post on GitHub.
As geometric repacking will not take into account reachability of objects we need to employ a hybrid strategy of geometric and full repacks:
- Geometric repacks are the default and will soak up all loose objects and potentially repack a subset of the repository's packfiles into a larger one.
- Full repacks will need to be performed every now and then to evict unreachable objects into cruft packs.
We need to employ a strategy to be able to tell when exactly a full repack needs to happen. Before, we used the number of packfiles in a repository for this, but given that we're handing over control of that number to git-repack(1) this will not be an option anymore. Instead, we can use a time-based metric where we do a full repack e.g. once per day if there is more than a single packfile.