Trivial fixes (#33304)
1. the error check was added for go-git, it was caused by the empty `.keep` file in the test fixtures. 2. use `PostFormValue` instead of `PostForm.Get` (`Get` needs to parse the form ahead) 3. fix incorrect container text (it should show "Images" in the header but not "OS/Arch") 4. align maven xml 5. fix closed PR color&icon
This commit is contained in:
parent
7582eb0419
commit
3b839f8dc0
12 changed files with 29 additions and 20 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue