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

Merge branch 'master' into refactor-better-encapsulation

This commit is contained in:
Jesse Duffield
2023-05-11 19:00:01 +10:00
14 changed files with 263 additions and 31 deletions

View File

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

View File

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