Skip to content

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
@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
@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
@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. 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