mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-20 16:10:50 +00:00
[Vendor] Switch go-version lib (#12719)
* vendor: switch from "mcuadros/go-version" to "hashicorp/go-version" * Adapt P1 * simplify * fix lint * adapt * fix lint & rm old code * no deadlock * rm RWMutex and check GoVersion only 1-time * Copyright header Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
9fdb4f887b
commit
bc11caff94
35 changed files with 1134 additions and 966 deletions
|
@ -28,7 +28,6 @@ import (
|
|||
"code.gitea.io/gitea/modules/user"
|
||||
|
||||
shellquote "github.com/kballard/go-shellquote"
|
||||
version "github.com/mcuadros/go-version"
|
||||
"github.com/unknwon/com"
|
||||
ini "gopkg.in/ini.v1"
|
||||
"strk.kbt.io/projects/go/libravatar"
|
||||
|
@ -479,12 +478,12 @@ func CheckLFSVersion() {
|
|||
//Disable LFS client hooks if installed for the current OS user
|
||||
//Needs at least git v2.1.2
|
||||
|
||||
binVersion, err := git.BinVersion()
|
||||
err := git.LoadGitVersion()
|
||||
if err != nil {
|
||||
log.Fatal("Error retrieving git version: %v", err)
|
||||
}
|
||||
|
||||
if !version.Compare(binVersion, "2.1.2", ">=") {
|
||||
if git.CheckGitVersionConstraint(">= 2.1.2") != nil {
|
||||
LFS.StartServer = false
|
||||
log.Error("LFS server support needs at least Git v2.1.2")
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue