diff options
author | Gusted <williamzijl7@hotmail.com> | 2022-01-23 21:19:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-23 22:19:32 +0100 |
commit | c2e13fb763ec4764f8ebbeb25b190b48ac7b99ad (patch) | |
tree | 29572d3dcc4666afe7056847578176370897fb61 /services | |
parent | 5e5740af69cb0f44ff0c1576a2387388d75bb4c2 (diff) | |
download | gitea-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 'services')
-rw-r--r-- | services/gitdiff/gitdiff.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/gitdiff/gitdiff.go b/services/gitdiff/gitdiff.go index 80e706b5ed..ae2800d180 100644 --- a/services/gitdiff/gitdiff.go +++ b/services/gitdiff/gitdiff.go @@ -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, |