Fix bug when visiting comparation page (#34334)

The `ci.HeadGitRepo` was opened and closed in the function
`ParseCompareInfo` but reused in the function `PrepareCompareDiff`.
This commit is contained in:
Lunny Xiao
2025-05-04 11:52:00 -07:00
committed by GitHub
parent 180aa00abf
commit 41f3d062a2
2 changed files with 2 additions and 13 deletions

View File

@ -1296,11 +1296,6 @@ func CompareAndPullRequestPost(ctx *context.Context) {
)
ci := ParseCompareInfo(ctx)
defer func() {
if ci != nil && ci.HeadGitRepo != nil {
ci.HeadGitRepo.Close()
}
}()
if ctx.Written() {
return
}