1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-03 09:07:19 +00:00

Fix repo empty guide (#33114)

This commit is contained in:
wxiaoguang
2025-01-06 12:07:52 +08:00
committed by GitHub
parent 3c1c508421
commit 40765b5d45
3 changed files with 7 additions and 2 deletions

View File

@ -250,6 +250,7 @@ func handleRepoEmptyOrBroken(ctx *context.Context) {
showEmpty = true // it is not really empty, but there is no branch
// at the moment, other repo units like "actions" are not able to handle such case,
// so we just mark the repo as empty to prevent from displaying these units.
ctx.Data["RepoHasContentsWithoutBranch"] = true
updateContextRepoEmptyAndStatus(ctx, true, repo_model.RepositoryReady)
} else {
// the repo is actually not empty and has branches, need to update the database later