From e27422f894bba501329ce482d725e4fd651482a7 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Wed, 9 Jul 2025 11:21:59 +0200 Subject: [PATCH] Bump minimum required git version to 2.32 The version choice is a little arbitrary, but see discussion at https://github.com/jesseduffield/lazygit/pull/4559#issuecomment-2876201680. The main reason why I'm updating the version now is that versions before 2.27 had a bug with branch sorting, where sorting by -committerdate (which will be our default soon) would sort branches that point at the same commit in reverse alphabetical order rather than alphabetical order. While this is only slightly annoying but not a huge deal for users, it makes maintaining our integration tests across versions very hard. So I wanted to update to at least 2.27 to get around this problem, and went with 2.32 after the discussion linked to above. The choice of which versions to run integration tests on is pretty arbitrary too, I just picked some at random which are about 5 to 6 minor versions apart. --- .github/workflows/ci.yml | 7 +++---- pkg/app/app.go | 2 +- pkg/i18n/english.go | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99ea11280..6b6cbcd52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,10 +49,9 @@ jobs: fail-fast: false matrix: git-version: - - 2.22.0 # oldest supported version - - 2.23.0 - - 2.25.1 - - 2.30.8 + - 2.32.0 # oldest supported version + - 2.38.2 # first version that supports the rebase.updateRefs config + - 2.44.0 - latest # We rely on github to have the latest version installed on their VMs runs-on: ubuntu-latest name: "Integration Tests - git ${{matrix.git-version}}" diff --git a/pkg/app/app.go b/pkg/app/app.go index ad0d487ec..914832b83 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -148,7 +148,7 @@ func (app *App) validateGitVersion() (*git_commands.GitVersion, error) { return nil, minVersionError } - if version.IsOlderThan(2, 22, 0) { + if version.IsOlderThan(2, 32, 0) { return nil, minVersionError } diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 5a725a677..cc3eb4fe6 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -1709,7 +1709,7 @@ func EnglishTranslationSet() *TranslationSet { CreateNewBranchFromCommit: "Create new branch off of commit", BuildingPatch: "Building patch", ViewCommits: "View commits", - MinGitVersionError: "Git version must be at least 2.22 (i.e. from 2019 onwards). Please upgrade your git version. Alternatively raise an issue at https://github.com/jesseduffield/lazygit/issues for lazygit to be more backwards compatible.", + MinGitVersionError: "Git version must be at least 2.32 (i.e. from 2021 onwards). Please upgrade your git version. Alternatively raise an issue at https://github.com/jesseduffield/lazygit/issues for lazygit to be more backwards compatible.", RunningCustomCommandStatus: "Running custom command", SubmoduleStashAndReset: "Stash uncommitted submodule changes and update", AndResetSubmodules: "And reset submodules",