Skip to content

Commit 6eb3c05

Browse files
authored
Avoid MoreThanOne Error (#19557) (#19591)
Backport #19557
1 parent 82f24be commit 6eb3c05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/repository/branch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func CreateNewBranch(doer *user_model.User, repo *repo_model.Repository, oldBran
3535

3636
if err := git.Push(git.DefaultContext, repo.RepoPath(), git.PushOptions{
3737
Remote: repo.RepoPath(),
38-
Branch: fmt.Sprintf("%s:%s%s", oldBranchName, git.BranchPrefix, branchName),
38+
Branch: fmt.Sprintf("%s%s:%s%s", git.BranchPrefix, oldBranchName, git.BranchPrefix, branchName),
3939
Env: models.PushingEnvironment(doer, repo),
4040
}); err != nil {
4141
if git.IsErrPushOutOfDate(err) || git.IsErrPushRejected(err) {

0 commit comments

Comments
 (0)