Skip to content

Commit

Permalink
Add uploadpack.allowAnySHA1InWant to allow --filter=blob:none with ol…
Browse files Browse the repository at this point in the history
…der git clients (#19430)

Older git clients need uploadpack.allowAnySHA1InWant if partial cloning is allowed.

Fix #19118

Signed-off-by: Andrew Thornton <art27@cantab.net>
  • Loading branch information
zeripath authored Apr 20, 2022
1 parent 5e68fe7 commit a7f0ce6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func Init(ctx context.Context) error {

// 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")
globalCommandArgs = append(globalCommandArgs, "-c", "uploadpack.allowfilter=true", "-c", "uploadpack.allowAnySHA1InWant=true")
}

// Save current git version on init to gitVersion otherwise it would require an RWMutex
Expand Down

0 comments on commit a7f0ce6

Please sign in to comment.