Follows #19266, #8553, Close #18553, now there are only three `Run..(&RunOpts{})` functions. * before: `stdout, err := RunInDir(path)` * now: `stdout, _, err := RunStdString(&git.RunOpts{Dir:path})`
Showing the changes to services/gitdiff/gitdiff.go (1 of 78 files). Show all
Unified · Split
| @@ -1378,7 +1378,7 @@ func GetDiff(gitRepo *git.Repository, opts *DiffOptions, files ...string) (*Diff · 1377 unmodified lines | ||
| 1378 | 1378 | go func(ctx context.Context, diffArgs []string, repoPath string, writer *io.PipeWriter) { |
| 1379 | 1379 | cmd := git.NewCommand(ctx, diffArgs...) |
| 1380 | 1380 | cmd.SetDescription(fmt.Sprintf("GetDiffRange [repo_path: %s]", repoPath)) |
| 1381 | − if err := cmd.RunWithContext(&git.RunContext{ | |
| 1381 | + if err := cmd.Run(&git.RunOpts{ | |
| 1382 | 1382 | Timeout: time.Duration(setting.Git.Timeout.Default) * time.Second, |
| 1383 | 1383 | Dir: repoPath, |
| 1384 | 1384 | Stderr: os.Stderr, |