aboutsummaryrefslogtreecommitdiffstats
path: root/services/mirror/mirror.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/mirror/mirror.go')
-rw-r--r--services/mirror/mirror.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/services/mirror/mirror.go b/services/mirror/mirror.go
index 75054b690f..da794ea585 100644
--- a/services/mirror/mirror.go
+++ b/services/mirror/mirror.go
@@ -23,7 +23,6 @@ import (
"code.gitea.io/gitea/modules/timeutil"
"code.gitea.io/gitea/modules/util"
- "github.com/mcuadros/go-version"
"github.com/unknwon/com"
)
@@ -43,11 +42,11 @@ func readAddress(m *models.Mirror) {
func remoteAddress(repoPath string) (string, error) {
var cmd *git.Command
- binVersion, err := git.BinVersion()
+ err := git.LoadGitVersion()
if err != nil {
return "", err
}
- if version.Compare(binVersion, "2.7", ">=") {
+ if git.CheckGitVersionConstraint(">= 2.7") == nil {
cmd = git.NewCommand("remote", "get-url", "origin")
} else {
cmd = git.NewCommand("config", "--get", "remote.origin.url")