aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/repo_archive.go
diff options
context:
space:
mode:
authorMartin Scholz <martin.scholz83@outlook.com>2022-02-11 13:47:22 +0100
committerGitHub <noreply@github.com>2022-02-11 13:47:22 +0100
commit26718a785ac49f17eab51ad0f5324d036b810f73 (patch)
tree9c8371e01460dacf8e65c88b3526e2123525c717 /modules/git/repo_archive.go
parent393ea86ae192325e45d7fac0fc6a277da8fb0fca (diff)
downloadgitea-26718a785ac49f17eab51ad0f5324d036b810f73.tar.gz
gitea-26718a785ac49f17eab51ad0f5324d036b810f73.zip
Change git.cmd to RunWithContext (#18693)
Change all `cmd...Pipeline` commands to `cmd.RunWithContext`. #18553 Co-authored-by: Martin Scholz <martin.scholz@versasec.com>
Diffstat (limited to 'modules/git/repo_archive.go')
-rw-r--r--modules/git/repo_archive.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/git/repo_archive.go b/modules/git/repo_archive.go
index cf09bba0db..b7c339c271 100644
--- a/modules/git/repo_archive.go
+++ b/modules/git/repo_archive.go
@@ -57,7 +57,12 @@ func (repo *Repository) CreateArchive(ctx context.Context, format ArchiveType, t
)
var stderr strings.Builder
- err := NewCommand(ctx, args...).RunInDirPipeline(repo.Path, target, &stderr)
+ err := NewCommand(ctx, args...).RunWithContext(&RunContext{
+ Timeout: -1,
+ Dir: repo.Path,
+ Stdout: target,
+ Stderr: &stderr,
+ })
if err != nil {
return ConcatenateError(err, stderr.String())
}