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 c54bc3f commit 0a06837Copy full SHA for 0a06837
routers/api/v1/repo/branch.go
@@ -189,6 +189,9 @@ func CreateBranch(ctx *context.APIContext) {
189
ctx.Error(http.StatusInternalServerError, "GetBranchCommit", err)
190
return
191
}
192
+ } else {
193
+ ctx.Error(http.StatusNotFound, "", "The old branch does not exist")
194
+ return
195
196
} else {
197
oldCommit, err = ctx.Repo.GitRepo.GetBranchCommit(ctx.Repo.Repository.DefaultBranch)
0 commit comments