refactor!: remove go-git backend (#39487)

Removes the go-git backend so every build uses the git CLI backend. Its
Windows performance advantage is gone, it lacks SHA-256 support, and it
breaks repositories on Windows.

The performance changes moved to
https://github.com/go-gitea/gitea/pull/39526.

Fixes https://github.com/go-gitea/gitea/issues/38359
Fixes https://github.com/go-gitea/gitea/issues/34694

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
silverwindandwxiaoguang authored and GitHub committed 2026-10-03 10:04:24 +00:00
1 parent 3932624947
commit ad38b60983
69 files changed
+995 -2741

No files matched your search

+1 -2
View File
@@ -23,7 +23,6 @@ import (
"gitea.dev/modules/svg"
"gitea.dev/modules/system"
"gitea.dev/modules/translation"
"gitea.dev/modules/util"
"gitea.dev/modules/web"
"gitea.dev/modules/web/routing"
actions_router "gitea.dev/routers/api/actions"
@@ -116,7 +115,7 @@ func InitWebInstalled(ctx context.Context) {
mustInit(git.InitFull)
log.Info("Git version: %s (home: %s)", git.DefaultFeatures().VersionInfo(), gitcmd.HomeDir())
if !git.DefaultFeatures().SupportHashSha256 {
log.Warn("sha256 hash support is disabled - requires Git >= 2.42." + util.Iif(git.DefaultFeatures().UsingGogit, " Gogit is currently unsupported.", ""))
log.Warn("sha256 hash support is disabled - requires Git >= 2.42.")
}
// Setup i18n