1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-07 22:02:56 +03:00

Rename From to AtLeast

This commit is contained in:
Stefan Haller
2023-04-15 12:39:30 +02:00
parent 30656b5ac6
commit c8f26aca68
4 changed files with 9 additions and 9 deletions

View File

@@ -60,7 +60,7 @@ type GitVersionRestriction struct {
} }
// Verifies the version is at least the given version (inclusive) // Verifies the version is at least the given version (inclusive)
func From(version string) GitVersionRestriction { func AtLeast(version string) GitVersionRestriction {
return GitVersionRestriction{from: version} return GitVersionRestriction{from: version}
} }

View File

@@ -96,18 +96,18 @@ func TestGitVersionRestriction(t *testing.T) {
expectedShouldRun bool expectedShouldRun bool
}{ }{
{ {
testName: "From, current is newer", testName: "AtLeast, current is newer",
gitVersion: From("2.24.9"), gitVersion: AtLeast("2.24.9"),
expectedShouldRun: true, expectedShouldRun: true,
}, },
{ {
testName: "From, current is same", testName: "AtLeast, current is same",
gitVersion: From("2.25.0"), gitVersion: AtLeast("2.25.0"),
expectedShouldRun: true, expectedShouldRun: true,
}, },
{ {
testName: "From, current is older", testName: "AtLeast, current is older",
gitVersion: From("2.26.0"), gitVersion: AtLeast("2.26.0"),
expectedShouldRun: false, expectedShouldRun: false,
}, },
{ {

View File

@@ -9,7 +9,7 @@ var DropTodoCommitWithUpdateRef = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Drops a commit during interactive rebase when there is an update-ref in the git-rebase-todo file", Description: "Drops a commit during interactive rebase when there is an update-ref in the git-rebase-todo file",
ExtraCmdArgs: "", ExtraCmdArgs: "",
Skip: false, Skip: false,
GitVersion: From("2.38.0"), GitVersion: AtLeast("2.38.0"),
SetupConfig: func(config *config.AppConfig) {}, SetupConfig: func(config *config.AppConfig) {},
SetupRepo: func(shell *Shell) { SetupRepo: func(shell *Shell) {
shell. shell.

View File

@@ -9,7 +9,7 @@ var DropTodoCommitWithUpdateRefShowBranchHeads = NewIntegrationTest(NewIntegrati
Description: "Drops a commit during interactive rebase when there is an update-ref in the git-rebase-todo file (with experimentalShowBranchHeads on)", Description: "Drops a commit during interactive rebase when there is an update-ref in the git-rebase-todo file (with experimentalShowBranchHeads on)",
ExtraCmdArgs: "", ExtraCmdArgs: "",
Skip: false, Skip: false,
GitVersion: From("2.38.0"), GitVersion: AtLeast("2.38.0"),
SetupConfig: func(config *config.AppConfig) { SetupConfig: func(config *config.AppConfig) {
config.UserConfig.Gui.ExperimentalShowBranchHeads = true config.UserConfig.Gui.ExperimentalShowBranchHeads = true
}, },