0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-02-20 02:46:13 +01:00
This commit is contained in:
Lunny Xiao 2025-11-13 18:54:19 -08:00
parent 2d34bdbfc6
commit 2ad34514a3

View File

@ -558,12 +558,7 @@ func UpdateBranch(ctx context.Context, repo *repo_model.Repository, doer *user_m
if isForcePush || force {
pushOpts.Force = true
}
if err := git.Push(ctx, repo.RepoPath(), pushOpts); err != nil {
return err
}
return nil
return gitrepo.Push(ctx, repo, pushOpts)
}
var ErrBranchIsDefault = util.ErrorWrap(util.ErrPermissionDenied, "branch is default")