mirror of
https://github.com/go-gitea/gitea
synced 2025-11-16 11:18:12 +00:00
Backport #31151 by @lunny Fix #31140 The previous logic is wrong when pushing multiple branches. After first branch updated, it will ignore left other branches sync operations. As a workaround for the repositories, just push a new commit after the patch applied will fix the repositories status. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@@ -332,7 +332,7 @@ func SyncBranchesToDB(ctx context.Context, repoID, pusherID int64, branchNames,
|
||||
if _, err := git_model.UpdateBranch(ctx, repoID, pusherID, branchName, commit); err != nil {
|
||||
return fmt.Errorf("git_model.UpdateBranch %d:%s failed: %v", repoID, branchName, err)
|
||||
}
|
||||
return nil
|
||||
continue
|
||||
}
|
||||
|
||||
// if database have branches but not this branch, it means this is a new branch
|
||||
|
||||
Reference in New Issue
Block a user