Commit ed6900ca authored by Sean McGivern's avatar Sean McGivern

Use raw_diffs to calculate MR files changed

We don't need to create the intermediate FileCollection object with its
associated highlighting in order to count how many files changed. Both
the compare object and the MR diff object have a raw_diffs method that
is perfectly fine for this case.
parent ee5cc454
...@@ -198,7 +198,9 @@ class MergeRequest < ActiveRecord::Base ...@@ -198,7 +198,9 @@ class MergeRequest < ActiveRecord::Base
end end
def diff_size def diff_size
diffs(diff_options).size opts = diff_options || {}
raw_diffs(opts).size
end end
def diff_base_commit def diff_base_commit
......
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