mirror of
https://github.com/go-gitea/gitea
synced 2025-07-06 10:37:20 +00:00
Backport #34444 by wxiaoguang Fix #34424 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user