summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/http.go
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2022-01-23 21:19:32 +0000
committerGitHub <noreply@github.com>2022-01-23 22:19:32 +0100
commitc2e13fb763ec4764f8ebbeb25b190b48ac7b99ad (patch)
tree29572d3dcc4666afe7056847578176370897fb61 /routers/web/repo/http.go
parent5e5740af69cb0f44ff0c1576a2387388d75bb4c2 (diff)
downloadgitea-c2e13fb763ec4764f8ebbeb25b190b48ac7b99ad.tar.gz
gitea-c2e13fb763ec4764f8ebbeb25b190b48ac7b99ad.zip
Fix partial cloning a repo (#18373)
- Pass the Global command args into serviceRPC. - Fixes error with partial cloning. - Add partial clone test - Include diff Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'routers/web/repo/http.go')
-rw-r--r--routers/web/repo/http.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/http.go b/routers/web/repo/http.go
index 1b5004017f..32811734d3 100644
--- a/routers/web/repo/http.go
+++ b/routers/web/repo/http.go
@@ -485,7 +485,7 @@ func serviceRPC(ctx gocontext.Context, h serviceHandler, service string) {
}
var stderr bytes.Buffer
- cmd := git.NewCommandContextNoGlobals(h.r.Context(), service, "--stateless-rpc", h.dir)
+ cmd := git.NewCommandContext(h.r.Context(), service, "--stateless-rpc", h.dir)
cmd.SetDescription(fmt.Sprintf("%s %s %s [repo_path: %s]", git.GitExecutable, service, "--stateless-rpc", h.dir))
if err := cmd.RunWithContext(&git.RunContext{
Timeout: -1,