Update minimum required Git version to v2.37.0
Release notes
We are updating the minimum required Git version for GitLab instances to Git v2.37.0. This newer version has a lot of changes that we, and other Git community members, have made which provide a much better experience and resolve many issues.
Some of the most notable changes include:
- Improved replication speed in
git-fetch - Improvements to
git-cat-filewhich reduces the number of spawning processes needed - Update which fixes corruption in Git references using the new
core.fsyncoption - A bugfix for
git-update-refwhich fixes flushing semantics so that we can properly lock references - Support for cruft packs
- A new feature to compute merges in bare repositories with
git-merge-tree
If you use a version of Git on your GitLab instance that is not bundled with GitLab, please ensure you upgrade to at least v2.37.0.
Problem to solve
Since our current minimum required Git version of v2.33.0 we have upstreamed quite a lot of patches into the Git project:
- Multiple patch series which greatly improve replication speed in git-fetch(1).
- A patch series which improves git-cat-file(1) so that we can avoid spawning two processes if we have a mix of requesting object info and object data.
- Changes which allow us to fix corruption in Git references with the new
core.fsyncoption. - A change in reference-transaction hook semantics so that packed-refs are now skipped. This allows us to get rid of a workaround we have in Gitaly which filters out all transactions which only consist of force deletions.
- A bugfix for git-update-ref(1) which fixes flushing semantics so that we can properly lock references.
- Cruft packs.
I think the core.fsync option to ensure data consistency is reason enough to upgrade our minimum required Git version: the worst that can happen to us is losing data of customers, and all versions previous to Git v2.36.0 don't handle this correctly for references in case of a hard-reset of the machine.