summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorPaco Guzman <pacoguzmanp@gmail.com>2016-07-26 09:21:42 +0200
committerPaco Guzman <pacoguzmanp@gmail.com>2016-08-03 07:00:20 +0200
commit8f359ea9170b984ad43d126e17628c31ac3a1f14 (patch)
treeee47d5172537ddedabc2cc38ef3cb5bf966c89ee /app/services
parentcd7c2cb6ddd4d9c9f9bdae00c887c0022c121c17 (diff)
downloadgitlab-ce-8f359ea9170b984ad43d126e17628c31ac3a1f14.tar.gz
Move to Gitlab::Diff::FileCollection
Instead calling diff_collection.count use diff_collection.size which is cache on the diff_collection
Diffstat (limited to 'app/services')
-rw-r--r--app/services/merge_requests/merge_request_diff_cache_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/merge_requests/merge_request_diff_cache_service.rb b/app/services/merge_requests/merge_request_diff_cache_service.rb
index 0a1905f7137..982540ba7f5 100644
--- a/app/services/merge_requests/merge_request_diff_cache_service.rb
+++ b/app/services/merge_requests/merge_request_diff_cache_service.rb
@@ -2,7 +2,7 @@ module MergeRequests
class MergeRequestDiffCacheService
def execute(merge_request)
# Executing the iteration we cache all the highlighted diff information
- SafeDiffs::MergeRequest.new(merge_request, diff_options: SafeDiffs.default_options).diff_files.to_a
+ merge_request.diff_file_collection(Gitlab::Diff::FileCollection.default_options).diff_files.to_a
end
end
end