Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix no branch redirection loop #33100

Closed
wants to merge 1 commit into from
Closed

Conversation

lunny
Copy link
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
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 4, 2025
@lunny lunny added type/bug backport/v1.23 This PR should be backported to Gitea 1.23 and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 4, 2025
@github-actions github-actions bot added modifies/translation modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files labels Jan 4, 2025
<div class="ui segment center">
{{ctx.Locale.Tr "repo.broken_message"}}
</div>
{{if (not .BranchesCount)}}
Copy link
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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v1.23 This PR should be backported to Gitea 1.23 lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/translation type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repo page redirect infinitely
3 participants