Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions routers/web/repo/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,11 @@
ci.HeadRepo = ctx.Repo.Repository
ci.HeadGitRepo = ctx.Repo.GitRepo
} else if has {
ci.HeadGitRepo, err = gitrepo.OpenRepository(ctx, ci.HeadRepo)
ci.HeadGitRepo, err = gitrepo.RepositoryFromRequestContextOrOpen(ctx, ci.HeadRepo)

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / test-e2e

undefined: gitrepo.RepositoryFromRequestContextOrOpen

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / test-sqlite

undefined: gitrepo.RepositoryFromRequestContextOrOpen

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / test-pgsql

undefined: gitrepo.RepositoryFromRequestContextOrOpen

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / test-mysql

undefined: gitrepo.RepositoryFromRequestContextOrOpen

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / test-mssql

undefined: gitrepo.RepositoryFromRequestContextOrOpen

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / test-unit

undefined: gitrepo.RepositoryFromRequestContextOrOpen

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / lint-backend

undefined: gitrepo.RepositoryFromRequestContextOrOpen) (typecheck)

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / lint-backend

undefined: gitrepo.RepositoryFromRequestContextOrOpen (typecheck)

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / lint-backend

undefined: gitrepo.RepositoryFromRequestContextOrOpen) (typecheck)

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / checks-backend

undefined: gitrepo.RepositoryFromRequestContextOrOpen

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / lint-go-windows

undefined: gitrepo.RepositoryFromRequestContextOrOpen) (typecheck)

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / lint-go-windows

undefined: gitrepo.RepositoryFromRequestContextOrOpen (typecheck)

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / lint-go-windows

undefined: gitrepo.RepositoryFromRequestContextOrOpen) (typecheck)

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / backend

undefined: gitrepo.RepositoryFromRequestContextOrOpen

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / lint-go-gogit

undefined: gitrepo.RepositoryFromRequestContextOrOpen) (typecheck)

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / lint-go-gogit

undefined: gitrepo.RepositoryFromRequestContextOrOpen (typecheck)

Check failure on line 403 in routers/web/repo/compare.go

View workflow job for this annotation

GitHub Actions / lint-go-gogit

undefined: gitrepo.RepositoryFromRequestContextOrOpen) (typecheck)
if err != nil {
ctx.ServerError("OpenRepository", err)
ctx.ServerError("RepositoryFromRequestContextOrOpen", err)
return nil
}
defer ci.HeadGitRepo.Close()
} else {
ctx.NotFound("ParseCompareInfo", nil)
return nil
Expand Down Expand Up @@ -707,11 +706,6 @@
// CompareDiff show different from one commit to another commit
func CompareDiff(ctx *context.Context) {
ci := ParseCompareInfo(ctx)
defer func() {
if ci != nil && ci.HeadGitRepo != nil {
ci.HeadGitRepo.Close()
}
}()
if ctx.Written() {
return
}
Expand Down
5 changes: 0 additions & 5 deletions routers/web/repo/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -1262,11 +1262,6 @@ func CompareAndPullRequestPost(ctx *context.Context) {
)

ci := ParseCompareInfo(ctx)
defer func() {
if ci != nil && ci.HeadGitRepo != nil {
ci.HeadGitRepo.Close()
}
}()
if ctx.Written() {
return
}
Expand Down
Loading