Skip to content
Snippets Groups Projects
Commit 48568a9d authored by Ahmad Sherif's avatar Ahmad Sherif
Browse files

Check for keep-around commits once if target and source projects are the same

This reduces the number of RefExists RPC call.
parent 826105df
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment