Skip to content

Commit 65b5c8e

Browse files
authored
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>
1 parent 9dc53ba commit 65b5c8e

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

Diff for: modules/git/git.go

-5
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,6 @@ func InitOnceWithSync(ctx context.Context) (err error) {
190190
globalCommandArgs = append(globalCommandArgs, "-c", "protocol.version=2")
191191
}
192192

193-
// By default partial clones are disabled, enable them from git v2.22
194-
if !setting.Git.DisablePartialClone && CheckGitVersionAtLeast("2.22") == nil {
195-
globalCommandArgs = append(globalCommandArgs, "-c", "uploadpack.allowfilter=true", "-c", "uploadpack.allowAnySHA1InWant=true")
196-
}
197-
198193
// Explicitly disable credential helper, otherwise Git credentials might leak
199194
if CheckGitVersionAtLeast("2.9") == nil {
200195
globalCommandArgs = append(globalCommandArgs, "-c", "credential.helper=")

0 commit comments

Comments
 (0)