summaryrefslogtreecommitdiffstats
path: root/modules/git/repo_object.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-11-30 20:06:32 +0000
committerGitHub <noreply@github.com>2021-11-30 20:06:32 +0000
commit01087e9eef21ff5ea1cebbb1e84933954671fdf2 (patch)
treeae618785a3bd46e012096683e2fd2309f87c571d /modules/git/repo_object.go
parentd894c90b703ce215e2319ae2e2bf95989f77805d (diff)
downloadgitea-01087e9eef21ff5ea1cebbb1e84933954671fdf2.tar.gz
gitea-01087e9eef21ff5ea1cebbb1e84933954671fdf2.zip
Make Requests Processes and create process hierarchy. Associate OpenRepository with context. (#17125)
This PR registers requests with the process manager and manages hierarchy within the processes. Git repos are then associated with a context, (usually the request's context) - with sub commands using this context as their base context. Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/git/repo_object.go')
-rw-r--r--modules/git/repo_object.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/repo_object.go b/modules/git/repo_object.go
index f054c34902..3921e6a1d4 100644
--- a/modules/git/repo_object.go
+++ b/modules/git/repo_object.go
@@ -42,7 +42,7 @@ func (repo *Repository) HashObject(reader io.Reader) (SHA1, error) {
}
func (repo *Repository) hashObject(reader io.Reader) (string, error) {
- cmd := NewCommand("hash-object", "-w", "--stdin")
+ cmd := NewCommandContext(repo.Ctx, "hash-object", "-w", "--stdin")
stdout := new(bytes.Buffer)
stderr := new(bytes.Buffer)
err := cmd.RunInDirFullPipeline(repo.Path, stdout, stderr, reader)