mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-12 06:06:05 +10:00
Fix unmerged diff for non-fork MR
This commit is contained in:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user