Memoize merge base commit for project

What does this MR do and why?

MR creation page is calling merge_base_commit 4 times with the same parameters. We can optimize these calls with memoization pattern.

image

How to set up and validate locally

  1. Go to 'New merge request' page
  2. Observe Gitaly's repository_service#find_merge_base called only once

Merge request reports

Loading