summaryrefslogtreecommitdiff
path: root/app/controllers/projects/branches_controller.rb
diff options
context:
space:
mode:
authorLin Jen-Shin (godfat) <godfat@godfat.org>2017-10-27 15:55:08 +0000
committerRémy Coutable <remy@rymai.me>2017-10-27 15:55:08 +0000
commit57d7ed05d96928f7e33135e7397bdd6b3b0d25e0 (patch)
treecc5f65076fc0acc1b5ff191d502a706e797544af /app/controllers/projects/branches_controller.rb
parent7c4da276d34e008b5aa86971cfd627a813d84df7 (diff)
downloadgitlab-ce-57d7ed05d96928f7e33135e7397bdd6b3b0d25e0.tar.gz
Fetch the merged branches at once
Diffstat (limited to 'app/controllers/projects/branches_controller.rb')
-rw-r--r--app/controllers/projects/branches_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb
index 7f03ce07dec..f28df83d5a5 100644
--- a/app/controllers/projects/branches_controller.rb
+++ b/app/controllers/projects/branches_controller.rb
@@ -15,6 +15,8 @@ class Projects::BranchesController < Projects::ApplicationController
respond_to do |format|
format.html do
@refs_pipelines = @project.pipelines.latest_successful_for_refs(@branches.map(&:name))
+ @merged_branch_names =
+ repository.merged_branch_names(@branches.map(&:name))
# n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/37429
Gitlab::GitalyClient.allow_n_plus_1_calls do
@max_commits = @branches.reduce(0) do |memo, branch|