1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-06 10:37:20 +00:00

Fix repo broken check (#34444) (#34452)

Backport #34444 by wxiaoguang

Fix #34424

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot
2025-05-14 03:02:24 +08:00
committed by GitHub
parent 89f1df033a
commit 47ee84d1f3
3 changed files with 32 additions and 19 deletions

View File

@ -795,8 +795,8 @@ func RepoRefByType(detectRefType git.RefType) func(*Context) {
return func(ctx *Context) {
var err error
refType := detectRefType
if ctx.Repo.Repository.IsBeingCreated() {
return // no git repo, so do nothing, users will see a "migrating" UI provided by "migrate/migrating.tmpl"
if ctx.Repo.Repository.IsBeingCreated() || ctx.Repo.Repository.IsBroken() {
return // no git repo, so do nothing, users will see a "migrating" UI provided by "migrate/migrating.tmpl", or empty repo guide
}
// Empty repository does not have reference information.
if ctx.Repo.Repository.IsEmpty {