forked from forgejo/forgejo
Change git.cmd to RunWithContext (#18693)
Change all `cmd...Pipeline` commands to `cmd.RunWithContext`. #18553 Co-authored-by: Martin Scholz <martin.scholz@versasec.com>
This commit is contained in:
parent
393ea86ae1
commit
26718a785a
28 changed files with 530 additions and 155 deletions
|
@ -53,7 +53,12 @@ func FindLFSFile(repo *git.Repository, hash git.SHA1) ([]*LFSResult, error) {
|
|||
|
||||
go func() {
|
||||
stderr := strings.Builder{}
|
||||
err := git.NewCommand(repo.Ctx, "rev-list", "--all").RunInDirPipeline(repo.Path, revListWriter, &stderr)
|
||||
err := git.NewCommand(repo.Ctx, "rev-list", "--all").RunWithContext(&git.RunContext{
|
||||
Timeout: -1,
|
||||
Dir: repo.Path,
|
||||
Stdout: revListWriter,
|
||||
Stderr: &stderr,
|
||||
})
|
||||
if err != nil {
|
||||
_ = revListWriter.CloseWithError(git.ConcatenateError(err, (&stderr).String()))
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue