Commit f4978bc0 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix unmerged diff for non-fork MR

parent b4e94f9981e5
......@@ -152,7 +152,7 @@ def unmerged_diffs
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 @@ def unmerged_commits
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