Skip to content

Remove duplicate calls of MergeRequest#can_be_reverted? on MR widget endpoint

What does this MR do?

According to http://profiler.gitlap.com/20180123/d988e1eb-0370-4a25-9a4e-6d36112a403a.html.gz, we can see Commit#has_been_reverted? is called twice in MergeRequestsController#show.json. That happens because MergeRequest#can_be_reverted? is also called twice on MergeRequestsPresenter.

Reported via https://gitlab.com/gitlab-org/gitlab-ce/issues/36876#note_55858440

Screenshots (if relevant)

image image

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Edited by Oswaldo Ferreira

Merge request reports