From e78c701aff3fe57847552ca6db6a9ad615b555fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Mon, 6 Nov 2017 16:29:50 +0100 Subject: Pass the Gitlab::Git::Branch object to Repository#merged_to_root_ref? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- lib/api/entities.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/api/entities.rb b/lib/api/entities.rb index df78e49b8cf..3f4e214fe33 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -242,10 +242,7 @@ module API end expose :merged do |repo_branch, options| - # n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/37442 - Gitlab::GitalyClient.allow_n_plus_1_calls do - options[:project].repository.merged_to_root_ref?(repo_branch.name, options[:merged_branch_names]) - end + options[:project].repository.merged_to_root_ref?(repo_branch, options[:merged_branch_names]) end expose :protected do |repo_branch, options| -- cgit v1.2.1