go-version constraints ignore pre-releases (#13234)
Go-version constraints ignore pre-releases. Rather than change the library further this PR simply changes the git version comparison to use simple version compare ignoring the issue of pre-releases. Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
53359b1861
commit
de6e427a01
12 changed files with 25 additions and 25 deletions
|
@ -74,7 +74,7 @@ func newGit() {
|
|||
log.Fatal("Error retrieving git version: %v", err)
|
||||
}
|
||||
|
||||
if git.CheckGitVersionConstraint(">= 2.9") == nil {
|
||||
if git.CheckGitVersionAtLeast("2.9") == nil {
|
||||
// Explicitly disable credential helper, otherwise Git credentials might leak
|
||||
git.GlobalCommandArgs = append(git.GlobalCommandArgs, "-c", "credential.helper=")
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ func newGit() {
|
|||
var format = "Git Version: %s"
|
||||
var args = []interface{}{version.Original()}
|
||||
// Since git wire protocol has been released from git v2.18
|
||||
if Git.EnableAutoGitWireProtocol && git.CheckGitVersionConstraint(">= 2.18") == nil {
|
||||
if Git.EnableAutoGitWireProtocol && git.CheckGitVersionAtLeast("2.18") == nil {
|
||||
git.GlobalCommandArgs = append(git.GlobalCommandArgs, "-c", "protocol.version=2")
|
||||
format += ", Wire Protocol %s Enabled"
|
||||
args = append(args, "Version 2") // for focus color
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue