Skip to content

git/housekeeping: Work around broken geometric repacks in pooled repos

Geometric repacks in repositories that are connected to an object pool can run into some edge cases that cause git-repack(1) to die:

- When repacking a repository that has all of its objects
  deduplicated via an object pool Git would fail with an error that
  it cannot find the preferred packfile.

- When repacking a repository that has the exact same packfile as
  its pool repository Git would fail with an error that it cannot
  find that packfile at all.

Both of these errors have the same root cause, namely that git-repack(1) does not pay attention to whether packfiles are local or not: it should never care about repacking packfiles borrowed from an alternate.

We have implemented a patch for git-repack(1) that fixes this behaviour. But meanwhile, we can enable geometric repacking in repositories that aren't connected to an object pool. As repositories which are connected to an object pool would have most of their objects deduplicated in the general case anyway, this should still allow us to gain a significant performance improvement for most repositories.

Closes #4998 (closed).

Edited by Patrick Steinhardt

Merge request reports