-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set uploadpack.allowFilter etc on gitea serv to enable partial clones with SSH #20879
Set uploadpack.allowFilter etc on gitea serv to enable partial clones with SSH #20879
Conversation
… with ssh When setting.Git.DisablePartialClone is set to false then the web server will add filter support to web http. The ssh serv wrapper is missing this code and therefore we need to add it. Fix go-gitea#20400 Signed-off-by: Andrew Thornton <art27@cantab.net>
@@ -326,6 +326,11 @@ func runServ(c *cli.Context) error { | |||
// it could be re-considered whether to use the same git.CommonGitCmdEnvs() as "git" command later. | |||
gitcmd.Env = append(gitcmd.Env, git.CommonCmdServEnvs()...) | |||
|
|||
// By default partial clones are disabled, enable them from git v2.22 | |||
if !setting.Git.DisablePartialClone && git.CheckGitVersionAtLeast("2.22") == nil { | |||
gitcmd.Env = append(gitcmd.Env, "-c", "uploadpack.allowfilter=true", "-c", "uploadpack.allowAnySHA1InWant=true") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think these works if you append them to the environment variables. You need to pass these as arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hah! What was I thinking! Of course this should be arguments!!
I'm gonna close this as we need to decide what we're going to do here - but we should do something about this. |
Ready again |
but I can't reopen the request for some reason so see #20902 |
When setting.Git.DisablePartialClone is set to false then the
web server will add filter support to web http. The ssh serv
wrapper is missing this code and therefore we need to add it.
Fix #20400
Signed-off-by: Andrew Thornton art27@cantab.net