Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed May 4, 2023
1 parent 1fc95f2 commit 1c4fc9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions routers/api/v1/repo/branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ func CreateBranch(ctx *context.APIContext) {
ctx.Error(http.StatusInternalServerError, "GetCommit", err)
return
}
} else if len(opt.OldBranchName) > 0 {
if ctx.Repo.GitRepo.IsBranchExist(opt.OldBranchName) {
oldCommit, err = ctx.Repo.GitRepo.GetBranchCommit(opt.OldBranchName)
} else if len(opt.OldBranchName) > 0 { //nolint
if ctx.Repo.GitRepo.IsBranchExist(opt.OldBranchName) { //nolint
oldCommit, err = ctx.Repo.GitRepo.GetBranchCommit(opt.OldBranchName) //nolint
if err != nil {
ctx.Error(http.StatusInternalServerError, "GetBranchCommit", err)
return
Expand Down

0 comments on commit 1c4fc9e

Please sign in to comment.