diff options
author | 99rgosse <61579380+99rgosse@users.noreply.github.com> | 2022-05-01 03:09:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-01 03:09:59 +0200 |
commit | edff571aa927f3c412ce91976e248ad4569b0c77 (patch) | |
tree | dfbd7a57013f53f46001203f17daf8190e2d668f | |
parent | 094c8fdc8708bda79c427dcf2c0178d69a0d5765 (diff) | |
download | gitea-edff571aa927f3c412ce91976e248ad4569b0c77.tar.gz gitea-edff571aa927f3c412ce91976e248ad4569b0c77.zip |
Avoid MoreThanOne Error (#19557)
-rw-r--r-- | services/repository/branch.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/repository/branch.go b/services/repository/branch.go index 6667cdee61..d9fc47c63a 100644 --- a/services/repository/branch.go +++ b/services/repository/branch.go @@ -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) { |