Commit e78c701a authored by Rémy Coutable's avatar Rémy Coutable

Pass the Gitlab::Git::Branch object to Repository#merged_to_root_ref?

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent ad937d27
......@@ -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|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment