aboutsummaryrefslogtreecommitdiffstats
path: root/services/mirror/mirror.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-10-21 16:42:08 +0100
committerGitHub <noreply@github.com>2020-10-21 11:42:08 -0400
commitde6e427a0188ef1be6108c5a71979dc4dd679aec (patch)
treeac0d5a17dcac25c4a6f702b6949123d527027002 /services/mirror/mirror.go
parent53359b1861c79ea688a3c230d235fb515eb44c01 (diff)
downloadgitea-de6e427a0188ef1be6108c5a71979dc4dd679aec.tar.gz
gitea-de6e427a0188ef1be6108c5a71979dc4dd679aec.zip
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>
Diffstat (limited to 'services/mirror/mirror.go')
-rw-r--r--services/mirror/mirror.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/mirror/mirror.go b/services/mirror/mirror.go
index 5eafdab38d..22aed2c3a4 100644
--- a/services/mirror/mirror.go
+++ b/services/mirror/mirror.go
@@ -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")