summaryrefslogtreecommitdiff
path: root/app/models/merge_request.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r--app/models/merge_request.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index abc8bacbe59..62e5573dfdc 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -168,8 +168,12 @@ class MergeRequest < ActiveRecord::Base
merge_request_diff ? merge_request_diff.diffs(*args) : compare.diffs(*args)
end
- def diff_file_collection(diff_options)
- Gitlab::Diff::FileCollection::MergeRequest.new(self, diff_options: diff_options)
+ def diff_file_collection(diff_options = nil)
+ if self.compare
+ self.compare.diff_file_collection(diff_options: diff_options, diff_refs: diff_refs)
+ else
+ Gitlab::Diff::FileCollection::MergeRequest.new(self, diff_options: diff_options)
+ end
end
def diff_size