Skip to content

Fix no branch redirection loop#33100

Closed
lunny wants to merge 1 commit into
go-gitea:mainfrom
lunny:lunny/fix_no_branch
Closed

Fix no branch redirection loop#33100
lunny wants to merge 1 commit into
go-gitea:mainfrom
lunny:lunny/fix_no_branch

Conversation

@lunny
Copy link
Copy Markdown
Member

@lunny lunny commented Jan 4, 2025

Fix #33092

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 4, 2025
@lunny lunny added type/bug backport/v1.23 and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. size/S labels Jan 4, 2025
Comment thread templates/repo/empty.tmpl
<div class="ui segment center">
{{ctx.Locale.Tr "repo.broken_message"}}
</div>
{{if (not .BranchesCount)}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why in if IsBroken block?

BranchesCount==0 means IsBroken==true?

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 4, 2025
@wxiaoguang
Copy link
Copy Markdown
Contributor

I think it should be like this: Fix empty git repo handling logic #33101 , and no need to use the fragile if v, ok := ctx.Data["BranchesCount"]; ok && v.(int64) == 0 {

@lunny lunny closed this Jan 4, 2025
@lunny lunny deleted the lunny/fix_no_branch branch January 4, 2025 05:49
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Apr 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repo page redirect infinitely

3 participants