1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-23 09:58:27 +00:00

Fix git.Blob.DataAsync(): close pipe since we return a NopCloser (#16899) (#16900)

* make sure headGitRepo is closed on err too
* refactor
* Fix git.Blob.DataAsync(): exec cancel since we already read all bytes (close pipe since we return a NopCloser)

Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
6543
2021-08-31 10:06:01 +02:00
committed by GitHub
parent 67776372d6
commit 0274933c22
4 changed files with 7 additions and 9 deletions

View File

@@ -623,7 +623,6 @@ func CompareDiff(ctx *context.Context) {
headGitRepo.Close()
}
}()
if ctx.Written() {
return
}