mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-04 13:50:39 +00:00
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
|
@ -45,7 +45,13 @@ func (repo *Repository) hashObject(reader io.Reader) (string, error) {
|
|||
cmd := NewCommand(repo.Ctx, "hash-object", "-w", "--stdin")
|
||||
stdout := new(bytes.Buffer)
|
||||
stderr := new(bytes.Buffer)
|
||||
err := cmd.RunInDirFullPipeline(repo.Path, stdout, stderr, reader)
|
||||
err := cmd.RunWithContext(&RunContext{
|
||||
Timeout: -1,
|
||||
Dir: repo.Path,
|
||||
Stdin: reader,
|
||||
Stdout: stdout,
|
||||
Stderr: stderr,
|
||||
})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue