aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/repo_ref_nogogit.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-04-01 10:55:30 +0800
committerGitHub <noreply@github.com>2022-04-01 10:55:30 +0800
commit124b072f0b69650baff086b9688d198f5a6761af (patch)
treefa18f7930053a8408e124875b5dec20e0309332b /modules/git/repo_ref_nogogit.go
parent3a73645502392110369b5d78fa2c9136e77e4aa2 (diff)
downloadgitea-124b072f0b69650baff086b9688d198f5a6761af.tar.gz
gitea-124b072f0b69650baff086b9688d198f5a6761af.zip
Remove `git.Command.Run` and `git.Command.RunInDir*` (#19280)
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})`
Diffstat (limited to 'modules/git/repo_ref_nogogit.go')
-rw-r--r--modules/git/repo_ref_nogogit.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/git/repo_ref_nogogit.go b/modules/git/repo_ref_nogogit.go
index 42295e43ac..40e8a247c7 100644
--- a/modules/git/repo_ref_nogogit.go
+++ b/modules/git/repo_ref_nogogit.go
@@ -23,11 +23,10 @@ func (repo *Repository) GetRefsFiltered(pattern string) ([]*Reference, error) {
go func() {
stderrBuilder := &strings.Builder{}
- err := NewCommand(repo.Ctx, "for-each-ref").RunWithContext(&RunContext{
- Timeout: -1,
- Dir: repo.Path,
- Stdout: stdoutWriter,
- Stderr: stderrBuilder,
+ err := NewCommand(repo.Ctx, "for-each-ref").Run(&RunOpts{
+ Dir: repo.Path,
+ Stdout: stdoutWriter,
+ Stderr: stderrBuilder,
})
if err != nil {
_ = stdoutWriter.CloseWithError(ConcatenateError(err, stderrBuilder.String()))