mirror of https://github.com/go-gitea/gitea.git
Avoid MoreThanOne Error (#19557)
This commit is contained in:
parent
094c8fdc87
commit
edff571aa9
|
@ -35,7 +35,7 @@ func CreateNewBranch(ctx context.Context, doer *user_model.User, repo *repo_mode
|
||||||
|
|
||||||
if err := git.Push(ctx, repo.RepoPath(), git.PushOptions{
|
if err := git.Push(ctx, repo.RepoPath(), git.PushOptions{
|
||||||
Remote: repo.RepoPath(),
|
Remote: repo.RepoPath(),
|
||||||
Branch: fmt.Sprintf("%s:%s%s", oldBranchName, git.BranchPrefix, branchName),
|
Branch: fmt.Sprintf("%s%s:%s%s", git.BranchPrefix, oldBranchName, git.BranchPrefix, branchName),
|
||||||
Env: models.PushingEnvironment(doer, repo),
|
Env: models.PushingEnvironment(doer, repo),
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
if git.IsErrPushOutOfDate(err) || git.IsErrPushRejected(err) {
|
if git.IsErrPushOutOfDate(err) || git.IsErrPushRejected(err) {
|
||||||
|
|
Loading…
Reference in New Issue