mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 10:56:10 +01: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:
		| @@ -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