mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00: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 <[email protected]>
This commit is contained in:
co-authored by
GitHub
Lunny Xiao
parent
5e5740af69
commit
c2e13fb763
@@ -1376,7 +1376,7 @@ func GetDiff(gitRepo *git.Repository, opts *DiffOptions, files ...string) (*Diff
|
||||
}()
|
||||
|
||||
go func(ctx context.Context, diffArgs []string, repoPath string, writer *io.PipeWriter) {
|
||||
cmd := git.NewCommandContextNoGlobals(ctx, diffArgs...)
|
||||
cmd := git.NewCommandContext(ctx, diffArgs...)
|
||||
cmd.SetDescription(fmt.Sprintf("GetDiffRange [repo_path: %s]", repoPath))
|
||||
if err := cmd.RunWithContext(&git.RunContext{
|
||||
Timeout: time.Duration(setting.Git.Timeout.Default) * time.Second,
|
||||
|
||||
Reference in New Issue
Block a user