Smart Repack
Right now, repacks are triggered by the rails application based on repository activity. This is a very coarse heuristic for when is the best time to repack a repository. We can do a better job in the ReplicatRepository RPC that takes the following into consideration:
- how many loose files are there?
- how many files are on alternates?
- how many packfiles are there?
- what's the biggest packfile?
based on what we have access to on disk, we can make a more fine grained and smarter decision on when to repack a repository.