mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 19:52:01 +00:00
enhance!: raise minimum git version to 2.34 (#39565)
Raise the minimum git version to 2.34, the version in Ubuntu 22.04, Debian 12 and RHEL 8 ship newer, and remove the fallbacks it makes obsolete. - Always enable AGit - Use `diff --skip-to` and `apply -3` unconditionally - Set the default branch of new repos and wikis via `git init --initial-branch` - Detect rebase conflicts via `REBASE_HEAD`
This commit is contained in:
+1
-3
@@ -24,12 +24,11 @@ import (
|
||||
"github.com/hashicorp/go-version"
|
||||
)
|
||||
|
||||
const RequiredVersion = "2.25.0" // the minimum Git version required
|
||||
const RequiredVersion = "2.34.0" // the minimum Git version required
|
||||
|
||||
type Features struct {
|
||||
gitVersion *version.Version
|
||||
|
||||
SupportProcReceive bool // >= 2.29
|
||||
SupportHashSha256 bool // >= 2.42, SHA-256 repositories no longer an ‘experimental curiosity’
|
||||
SupportedObjectFormats []ObjectFormat // sha1, sha256
|
||||
SupportCheckAttrOnBare bool // >= 2.40
|
||||
@@ -79,7 +78,6 @@ func loadGitVersionFeatures() (*Features, error) {
|
||||
}
|
||||
|
||||
features := &Features{gitVersion: ver}
|
||||
features.SupportProcReceive = features.CheckVersionAtLeast("2.29")
|
||||
features.SupportHashSha256 = features.CheckVersionAtLeast("2.42")
|
||||
features.SupportedObjectFormats = []ObjectFormat{Sha1ObjectFormat}
|
||||
if features.SupportHashSha256 {
|
||||
|
||||
Reference in New Issue
Block a user