Commit 78de8816 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Also keep commits from source_project around, feedback:

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6658#note_17190236
parent 517effe9
......@@ -299,8 +299,10 @@ class MergeRequestDiff < ActiveRecord::Base
end
def keep_around_commits
repository.keep_around(start_commit_sha)
repository.keep_around(head_commit_sha)
repository.keep_around(base_commit_sha)
[repository, merge_request.source_project.repository].each do |repo|
repo.keep_around(start_commit_sha)
repo.keep_around(head_commit_sha)
repo.keep_around(base_commit_sha)
end
end
end
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