Skip to content

Commit

Permalink
Avoid MoreThanOne Error (#19557) (#19591)
Browse files Browse the repository at this point in the history
Backport #19557
  • Loading branch information
99rgosse authored May 3, 2022
1 parent 82f24be commit 6eb3c05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/repository/branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func CreateNewBranch(doer *user_model.User, repo *repo_model.Repository, oldBran

if err := git.Push(git.DefaultContext, repo.RepoPath(), git.PushOptions{
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),
}); err != nil {
if git.IsErrPushOutOfDate(err) || git.IsErrPushRejected(err) {
Expand Down

0 comments on commit 6eb3c05

Please # to comment.