diff options
author | zeripath <art27@cantab.net> | 2022-04-20 16:52:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-20 17:52:16 +0200 |
commit | a7f0ce620774be861f11b57d426ab59e27e4171a (patch) | |
tree | 07325df2d314c7cd22ded5b00dea56175557bbdf /modules | |
parent | 5e68fe7d37561aa9df470e4980cff833a7ee4f5f (diff) | |
download | gitea-a7f0ce620774be861f11b57d426ab59e27e4171a.tar.gz gitea-a7f0ce620774be861f11b57d426ab59e27e4171a.zip |
Add uploadpack.allowAnySHA1InWant to allow --filter=blob:none with older git clients (#19430)
Older git clients need uploadpack.allowAnySHA1InWant if partial cloning is allowed.
Fix #19118
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/git/git.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/git.go b/modules/git/git.go index b97bb14900..259759ca81 100644 --- a/modules/git/git.go +++ b/modules/git/git.go @@ -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 |