We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78c1d56 commit a2925c9Copy full SHA for a2925c9
routers/api/v1/repo/branch.go
@@ -176,10 +176,7 @@ func CreateBranch(ctx *context.APIContext) {
176
var oldCommit *git.Commit
177
var err error
178
179
- if len(opt.OldRefName) > 0 && len(opt.OldBranchName) > 0 {
180
- ctx.Error(http.StatusInternalServerError, "", "OldRefName And OldBranchName can not be both exist.")
181
- return
182
- } else if len(opt.OldRefName) > 0 {
+ if len(opt.OldRefName) > 0 {
183
if ctx.Repo.GitRepo.IsBranchExist(opt.OldRefName) {
184
oldCommit, err = ctx.Repo.GitRepo.GetBranchCommit(opt.OldRefName)
185
if err != nil {
0 commit comments