diff --git a/pkg/commands/git_commands/rebase.go b/pkg/commands/git_commands/rebase.go index 155455a34..1c0497da8 100644 --- a/pkg/commands/git_commands/rebase.go +++ b/pkg/commands/git_commands/rebase.go @@ -218,7 +218,7 @@ func (self *RebaseCommands) PrepareInteractiveRebaseCommand(opts PrepareInteract Arg("--keep-empty"). ArgIf(opts.keepCommitsThatBecomeEmpty && self.version.IsAtLeast(2, 26, 0), "--empty=keep"). Arg("--no-autosquash"). - ArgIf(self.version.IsAtLeast(2, 22, 0), "--rebase-merges"). + Arg("--rebase-merges"). ArgIf(opts.onto != "", "--onto", opts.onto). Arg(opts.baseHashOrRoot). ToArgv() diff --git a/pkg/commands/git_commands/rebase_test.go b/pkg/commands/git_commands/rebase_test.go index d79bc0b6a..47d7e9703 100644 --- a/pkg/commands/git_commands/rebase_test.go +++ b/pkg/commands/git_commands/rebase_test.go @@ -54,16 +54,6 @@ func TestRebaseRebaseBranch(t *testing.T) { assert.NoError(t, err) }, }, - { - testName: "successful rebase (< 2.22.0)", - arg: "master", - gitVersion: &GitVersion{2, 21, 9, ""}, - runner: oscommands.NewFakeRunner(t). - ExpectGitArgs([]string{"rebase", "--interactive", "--autostash", "--keep-empty", "--no-autosquash", "master"}, "", nil), - test: func(err error) { - assert.NoError(t, err) - }, - }, } for _, s := range scenarios { diff --git a/pkg/integration/tests/interactive_rebase/drop_merge_commit.go b/pkg/integration/tests/interactive_rebase/drop_merge_commit.go index fc0c21240..0011baf7d 100644 --- a/pkg/integration/tests/interactive_rebase/drop_merge_commit.go +++ b/pkg/integration/tests/interactive_rebase/drop_merge_commit.go @@ -10,7 +10,6 @@ var DropMergeCommit = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Drops a merge commit outside of an interactive rebase", ExtraCmdArgs: []string{}, Skip: false, - GitVersion: AtLeast("2.22.0"), // first version that supports the --rebase-merges option SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { shared.CreateMergeCommit(shell) diff --git a/pkg/integration/tests/interactive_rebase/edit_range_select_down_to_merge_outside_rebase.go b/pkg/integration/tests/interactive_rebase/edit_range_select_down_to_merge_outside_rebase.go index 364b04518..8ef1446fb 100644 --- a/pkg/integration/tests/interactive_rebase/edit_range_select_down_to_merge_outside_rebase.go +++ b/pkg/integration/tests/interactive_rebase/edit_range_select_down_to_merge_outside_rebase.go @@ -10,7 +10,6 @@ var EditRangeSelectDownToMergeOutsideRebase = NewIntegrationTest(NewIntegrationT Description: "Select a range of commits (the last one being a merge commit) to edit outside of a rebase", ExtraCmdArgs: []string{}, Skip: false, - GitVersion: AtLeast("2.22.0"), // first version that supports the --rebase-merges option SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { shared.CreateMergeCommit(shell) diff --git a/pkg/integration/tests/interactive_rebase/edit_range_select_outside_rebase.go b/pkg/integration/tests/interactive_rebase/edit_range_select_outside_rebase.go index 4ff2a8c83..d12a9c77d 100644 --- a/pkg/integration/tests/interactive_rebase/edit_range_select_outside_rebase.go +++ b/pkg/integration/tests/interactive_rebase/edit_range_select_outside_rebase.go @@ -10,7 +10,6 @@ var EditRangeSelectOutsideRebase = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Select a range of commits to edit outside of a rebase", ExtraCmdArgs: []string{}, Skip: false, - GitVersion: AtLeast("2.22.0"), // first version that supports the --rebase-merges option SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { shared.CreateMergeCommit(shell) diff --git a/pkg/integration/tests/submodule/enter.go b/pkg/integration/tests/submodule/enter.go index 363f2f1ba..588ae2049 100644 --- a/pkg/integration/tests/submodule/enter.go +++ b/pkg/integration/tests/submodule/enter.go @@ -29,11 +29,7 @@ var Enter = NewIntegrationTest(NewIntegrationTestArgs{ t.Views().Status().Content(Contains("repo")) } assertInSubmodule := func() { - if t.Git().Version().IsAtLeast(2, 22, 0) { - t.Views().Status().Content(Contains("my_submodule_path(my_submodule_name)")) - } else { - t.Views().Status().Content(Contains("my_submodule_path")) - } + t.Views().Status().Content(Contains("my_submodule_path(my_submodule_name)")) } assertInParentRepo() diff --git a/pkg/integration/tests/submodule/enter_nested.go b/pkg/integration/tests/submodule/enter_nested.go index 172dfbfae..24cdf5261 100644 --- a/pkg/integration/tests/submodule/enter_nested.go +++ b/pkg/integration/tests/submodule/enter_nested.go @@ -37,11 +37,7 @@ var EnterNested = NewIntegrationTest(NewIntegrationTestArgs{ // enter the nested submodule PressEnter() - if t.Git().Version().IsAtLeast(2, 22, 0) { - t.Views().Status().Content(Contains("innerSubPath(innerSubName)")) - } else { - t.Views().Status().Content(Contains("innerSubPath")) - } + t.Views().Status().Content(Contains("innerSubPath(innerSubName)")) t.Views().Commits().ContainsLines( Contains("initial inner commit"), ) diff --git a/pkg/integration/tests/submodule/reset.go b/pkg/integration/tests/submodule/reset.go index 282417238..6f78d974f 100644 --- a/pkg/integration/tests/submodule/reset.go +++ b/pkg/integration/tests/submodule/reset.go @@ -31,11 +31,7 @@ var Reset = NewIntegrationTest(NewIntegrationTestArgs{ t.Views().Status().Content(Contains("repo")) } assertInSubmodule := func() { - if t.Git().Version().IsAtLeast(2, 22, 0) { - t.Views().Status().Content(Contains("my_submodule_path(my_submodule_name)")) - } else { - t.Views().Status().Content(Contains("my_submodule_path")) - } + t.Views().Status().Content(Contains("my_submodule_path(my_submodule_name)")) } assertInParentRepo()