mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
* 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:
@ -1012,10 +1012,14 @@ func CompareAndPullRequestPost(ctx *context.Context) {
|
||||
)
|
||||
|
||||
headUser, headRepo, headGitRepo, prInfo, baseBranch, headBranch := ParseCompareInfo(ctx)
|
||||
defer func() {
|
||||
if headGitRepo != nil {
|
||||
headGitRepo.Close()
|
||||
}
|
||||
}()
|
||||
if ctx.Written() {
|
||||
return
|
||||
}
|
||||
defer headGitRepo.Close()
|
||||
|
||||
labelIDs, assigneeIDs, milestoneID, _ := ValidateRepoMetas(ctx, *form, true)
|
||||
if ctx.Written() {
|
||||
|
Reference in New Issue
Block a user