aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2022-11-14 07:58:11 +0000
committerGitHub <noreply@github.com>2022-11-14 15:58:11 +0800
commit65b5c8e5325c58fa0be77015adf0778bc1c74117 (patch)
tree17ea9752345941a0c6609e1a1116750b2e48df3a /modules
parent9dc53ba65f3a6b87acdd34d65dc4704cb3cf9e43 (diff)
downloadgitea-65b5c8e5325c58fa0be77015adf0778bc1c74117.tar.gz
gitea-65b5c8e5325c58fa0be77015adf0778bc1c74117.zip
Fix enabling partial clones on 1.17 (#21809)
When backporting #20902 in #21058 there was a slight misbackport. It was missed that we needed to remove the global command option before setting the settings. Fix #21805 Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules')
-rw-r--r--modules/git/git.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/modules/git/git.go b/modules/git/git.go
index 606a73b230..0fcc205b00 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=")