Fix repo broken check (#34444)

Fix #34424
This commit is contained in:
wxiaoguang authored and GitHub committed 2025-05-13 08:18:45 +00:00
1 parent b5fd3e7210
commit 5cb4cbf044
3 files changed
+32 -19

No files matched your search

+2 -2
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 {