mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 09:52:26 +02:00
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>
This commit is contained in:
parent
5e5740af69
commit
c2e13fb763
6 changed files with 24 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue