fix!: raise git required version to 2.13 (#37996)

format `lstrip=2` is only supported in git >= 2.13
https://git-scm.com/docs/git-for-each-ref/2.13.7

ref: #37994

Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
wxiaoguang
2026-06-04 21:56:16 +08:00
committed by GitHub
parent aaf4b149fa
commit dac41a124f
5 changed files with 16 additions and 61 deletions

View File

@@ -22,7 +22,7 @@ import (
"github.com/hashicorp/go-version"
)
const RequiredVersion = "2.6.0" // the minimum Git version required
const RequiredVersion = "2.13.0" // the minimum Git version required
type Features struct {
gitVersion *version.Version
@@ -173,13 +173,6 @@ func InitFull() (err error) {
if err = InitSimple(); err != nil {
return err
}
if setting.LFS.StartServer {
if !DefaultFeatures().CheckVersionAtLeast("2.1.2") {
return errors.New("LFS server support requires Git >= 2.1.2")
}
}
return syncGitConfig(context.Background())
}