diff --git a/modules/git/git.go b/modules/git/git.go index 606a73b23..0fcc205b0 100644 --- a/modules/git/git.go +++ b/modules/git/git.go @@ -190,11 +190,6 @@ func InitOnceWithSync(ctx context.Context) (err error) { globalCommandArgs = append(globalCommandArgs, "-c", "protocol.version=2") } - // By default partial clones are disabled, enable them from git v2.22 - if !setting.Git.DisablePartialClone && CheckGitVersionAtLeast("2.22") == nil { - globalCommandArgs = append(globalCommandArgs, "-c", "uploadpack.allowfilter=true", "-c", "uploadpack.allowAnySHA1InWant=true") - } - // Explicitly disable credential helper, otherwise Git credentials might leak if CheckGitVersionAtLeast("2.9") == nil { globalCommandArgs = append(globalCommandArgs, "-c", "credential.helper=")