Skip to content

Commit

Permalink
Avoid MoreThanOne Error (go-gitea#19557)
Browse files Browse the repository at this point in the history
  • Loading branch information
99rgosse authored May 1, 2022
1 parent 094c8fd commit edff571
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(ctx context.Context, doer *user_model.User, repo *repo_mode

if err := git.Push(ctx, 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 edff571

Please sign in to comment.