Check for keep-around commits once if target and source projects are the same
This reduces the number of RefExists RPC call.
This commit is contained in:
parent
826105dfda
commit
48568a9de0
1 changed files with 1 additions and 1 deletions
|
@ -290,7 +290,7 @@ class MergeRequestDiff < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def keep_around_commits
|
||||
[repository, merge_request.source_project.repository].each do |repo|
|
||||
[repository, merge_request.source_project.repository].uniq.each do |repo|
|
||||
repo.keep_around(start_commit_sha)
|
||||
repo.keep_around(head_commit_sha)
|
||||
repo.keep_around(base_commit_sha)
|
||||
|
|
Loading…
Reference in a new issue