Commit f4978bc0 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix unmerged diff for non-fork MR

parent 3f9b1d62
......@@ -152,7 +152,7 @@ class MergeRequest < ActiveRecord::Base
diffs = if for_fork?
Gitlab::Satellite::MergeAction.new(author, self).diffs_between_satellite
else
Gitlab::Git::Diff.between(project.repository, source_branch, target_branch)
Gitlab::Git::Diff.between(target_project.repository, source_branch, target_branch)
end
diffs ||= []
......@@ -195,6 +195,7 @@ class MergeRequest < ActiveRecord::Base
else
commits = target_project.repository.commits_between(self.target_branch, self.source_branch)
end
if commits.present?
commits = Commit.decorate(commits).
sort_by(&:created_at).
......
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