mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-03 17:04:35 -04:00
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>
This commit is contained in:
parent
d894c90b70
commit
01087e9eef
66 changed files with 591 additions and 306 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue