Trivial fixes (#33304) (#33312)

Backport #33304

The only conflict is caused by `templates/shared/issueicon.tmpl`
This commit is contained in:
wxiaoguang 2025-01-18 03:09:17 +08:00 committed by GitHub
parent 52d298890b
commit bf664c2e85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 52 additions and 43 deletions

View file

@ -6,7 +6,6 @@ package repository
import (
"context"
"fmt"
"strings"
"code.gitea.io/gitea/models/db"
git_model "code.gitea.io/gitea/models/git"
@ -52,9 +51,6 @@ func SyncRepoBranchesWithRepo(ctx context.Context, repo *repo_model.Repository,
{
branches, _, err := gitRepo.GetBranchNames(0, 0)
if err != nil {
if strings.Contains(err.Error(), "ref file is empty") {
return 0, nil
}
return 0, err
}
log.Trace("SyncRepoBranches[%s]: branches[%d]: %v", repo.FullName(), len(branches), branches)