diff options
author | Rémy Coutable <remy@rymai.me> | 2017-11-06 16:29:50 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-11-06 16:29:50 +0100 |
commit | e78c701aff3fe57847552ca6db6a9ad615b555fb (patch) | |
tree | 058f645f3cb25f39eccbf0f2c0c5838b5b7c4a26 /lib | |
parent | ad937d270c3fb4337a091841dc41ee0135a8a840 (diff) | |
download | gitlab-ce-e78c701aff3fe57847552ca6db6a9ad615b555fb.tar.gz |
Pass the Gitlab::Git::Branch object to Repository#merged_to_root_ref?37442-api-branches-id-repository-branches-is-calling-gitaly-n-1-times-per-request
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 5 |
1 files changed, 1 insertions, 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| |