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>
这个提交包含在:
Gusted
2022-01-23 22:19:32 +01:00
提交者 GitHub
共同撰写人 Lunny Xiao
父节点 5e5740af69
当前提交 c2e13fb763
修改 6 个文件,包含 24 行新增4 行删除
+1 -1
查看文件
@@ -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,