diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-11-07 14:09:00 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-11-07 14:09:00 +0300 |
commit | 8138d58d42cb128995b1f9d9ceab7f773c3300e3 (patch) | |
tree | 33d5d53a97755812ade5cdf93651edf4e6f6fa61 /lib/api/entities.rb | |
parent | 31e3ef93e53802bb99b342a7b403972493ed63cc (diff) | |
parent | e78c701aff3fe57847552ca6db6a9ad615b555fb (diff) |
Merge branch '37442-api-branches-id-repository-branches-is-calling-gitaly-n-1-times-per-request' into 'master'
Fetch the merged branches at once in the `/projects/:id/repository/branches` endpoint
See merge request gitlab-org/gitlab-ce!15215
Diffstat (limited to 'lib/api/entities.rb')
-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 8f44a39238e..a382db92e8d 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) - end + options[:project].repository.merged_to_root_ref?(repo_branch, options[:merged_branch_names]) end expose :protected do |repo_branch, options| |