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

* 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)
This commit is contained in:
6543 2021-08-31 09:43:31 +02:00 committed by GitHub
parent bb4cc876b1
commit d21702475b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 9 deletions

View file

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