From 5a64b3278bc4c2b4bc7b9ce70c77235bd5c163ba Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Wed, 7 Apr 2021 08:21:09 +0200 Subject: git: Bump minimum git version to git v2.31.0 With git v2.31.0, several new features have been introduced which we want to make use of: - Passing git configuration via a new set of enviroment variables `GIT_CONFIG_COUNT`, `GIT_CONFIG_KEY_$n` and `GIT_CONFIG_VALUE_$n`. This allows us to configure credentials without leaking them via the command line. - Atomic fetches, which allow us to make use of transactions when fetching many references via git-fetch(1). - A performance optmization for fetches from a repository which has a huge amount of references. Bump the minimum required git version to v2.31.0. Distributions of Gitaly (CNG, GDK, Omnibus) have been adapted to use Gitaly's `make git` target already and are thus using git v2.31.1. --- README.md | 2 +- changelogs/unreleased/pks-git-minimum-v2-31-0.yml | 5 +++++ internal/git/version.go | 4 ++-- internal/git/version_test.go | 7 ++++--- 4 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 changelogs/unreleased/pks-git-minimum-v2-31-0.yml diff --git a/README.md b/README.md index 43d072161..3d7070ac0 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Gitaly requires Go 1.13.9 or newer and Ruby 2.7. Run `make` to download and compile Ruby dependencies, and to compile the Gitaly Go executable. -Gitaly uses `git`. Versions `2.29.0` and newer are supported. +Gitaly uses `git`. Versions `2.31.0` and newer are supported. ## Configuration diff --git a/changelogs/unreleased/pks-git-minimum-v2-31-0.yml b/changelogs/unreleased/pks-git-minimum-v2-31-0.yml new file mode 100644 index 000000000..28634a514 --- /dev/null +++ b/changelogs/unreleased/pks-git-minimum-v2-31-0.yml @@ -0,0 +1,5 @@ +--- +title: 'git: Bump minimum git version to git v2.31.0' +merge_request: 3340 +author: +type: added diff --git a/internal/git/version.go b/internal/git/version.go index 83a95903c..50b03910c 100644 --- a/internal/git/version.go +++ b/internal/git/version.go @@ -16,9 +16,9 @@ var ( // - https://gitlab.com/gitlab-org/gitlab-foss/blob/master/.gitlab-ci.yml // - https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/system_check/app/git_version_check.rb minimumVersion = Version{ - versionString: "2.29.0", + versionString: "2.31.0", major: 2, - minor: 29, + minor: 31, patch: 0, rc: false, } diff --git a/internal/git/version_test.go b/internal/git/version_test.go index 57d8d3098..d78fd92e8 100644 --- a/internal/git/version_test.go +++ b/internal/git/version_test.go @@ -117,9 +117,10 @@ func TestVersion_IsSupported(t *testing.T) { {"2.24.0-rc0", false}, {"2.24.0", false}, {"2.25.0", false}, - {"2.29.0-rc0", false}, - {"2.29.0", true}, - {"2.29.1", true}, + {"2.30.0", false}, + {"2.31.0-rc0", false}, + {"2.31.0", true}, + {"2.31.1", true}, {"3.0.0", true}, } { version, err := parseVersion(tc.version) -- cgit v1.2.3