mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
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:
@@ -46,7 +46,7 @@ func remoteAddress(repoPath string) (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if git.CheckGitVersionConstraint(">= 2.7") == nil {
|
||||
if git.CheckGitVersionAtLeast("2.7") == nil {
|
||||
cmd = git.NewCommand("remote", "get-url", "origin")
|
||||
} else {
|
||||
cmd = git.NewCommand("config", "--get", "remote.origin.url")
|
||||
|
Reference in New Issue
Block a user