diff options
Diffstat (limited to 'routers/web/repo/patch.go')
-rw-r--r-- | routers/web/repo/patch.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/routers/web/repo/patch.go b/routers/web/repo/patch.go index 5faf9f4fa9..c04435cf1b 100644 --- a/routers/web/repo/patch.go +++ b/routers/web/repo/patch.go @@ -104,10 +104,9 @@ func NewDiffPatchPost(ctx *context.Context) { } else if models.IsErrCommitIDDoesNotMatch(err) { ctx.RenderWithErr(ctx.Tr("repo.editor.file_changed_while_editing", ctx.Repo.RepoLink+"/compare/"+form.LastCommit+"..."+ctx.Repo.CommitID), tplPatchFile, &form) return - } else { - ctx.RenderWithErr(ctx.Tr("repo.editor.fail_to_apply_patch", err), tplPatchFile, &form) - return } + ctx.RenderWithErr(ctx.Tr("repo.editor.fail_to_apply_patch", err), tplPatchFile, &form) + return } if form.CommitChoice == frmCommitChoiceNewBranch && ctx.Repo.Repository.UnitEnabled(ctx, unit.TypePullRequests) { |