Skip to content

Fix broken repacking tests (next) in WAL due to multi-pack-index changes in Git upstream

For #5817 (closed)

We have recently introduced support for repacking objects in the write-ahead log. The accommodating tests are broken with Git's master branch. It is because there is an on-going feature related to multi-pack-index in Git upstream. As a result, the hashing changes. In addition, the hashes in packfile names are non-deterministic, when pack.threads > 1. They are also highly subject to change in the future. As a result, using static hashes for test assertion was not a good idea from the first place.

This MR gets rid of the usage of static hashes:

  • In PackfilesState asserter, we don't need to depend on the file name. The asserter sorts actual and expected packfile states by their contained objects and compares the list instead.
  • In WAL log entries asserter, glob pattern matching is introduced. We don't actually care about file names and file contents there. They will be asserted when applied to the target repository. So, glob pattern for asserting their presence is enough.

Merge request reports