1
0
Fork 0
forked from forgejo/forgejo

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:
Gusted 2022-01-23 21:19:32 +00:00 committed by GitHub
parent 5e5740af69
commit c2e13fb763
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 4 deletions

View file

@ -81,7 +81,7 @@ func GetRepoRawDiffForFile(repo *Repository, startCommit, endCommit string, diff
}
stderr := new(bytes.Buffer)
cmd := NewCommandContextNoGlobals(repo.Ctx, args...)
cmd := NewCommandContext(repo.Ctx, args...)
if err = cmd.RunWithContext(&RunContext{
Timeout: -1,
Dir: repo.Path,