Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaco Guzman <pacoguzmanp@gmail.com>2016-07-26 10:21:42 +0300
committerPaco Guzman <pacoguzmanp@gmail.com>2016-08-03 08:00:20 +0300
commit8f359ea9170b984ad43d126e17628c31ac3a1f14 (patch)
treeee47d5172537ddedabc2cc38ef3cb5bf966c89ee /app/controllers/projects/compare_controller.rb
parentcd7c2cb6ddd4d9c9f9bdae00c887c0022c121c17 (diff)
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/controllers/projects/compare_controller.rb')
-rw-r--r--app/controllers/projects/compare_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/compare_controller.rb b/app/controllers/projects/compare_controller.rb
index 2eda950a1bd..252ddfa429a 100644
--- a/app/controllers/projects/compare_controller.rb
+++ b/app/controllers/projects/compare_controller.rb
@@ -21,7 +21,7 @@ class Projects::CompareController < Projects::ApplicationController
def diff_for_path
return render_404 unless @compare
- render_diff_for_path(SafeDiffs::Compare.new(@compare, project: @project, diff_options: diff_options))
+ render_diff_for_path(Compare.decorate(@compare, @project).diff_file_collection(diff_options: diff_options))
end
def create
@@ -51,7 +51,7 @@ class Projects::CompareController < Projects::ApplicationController
start_sha: @start_commit.try(:sha),
head_sha: @commit.try(:sha)
)
- @diffs = SafeDiffs::Compare.new(@compare, project: @project, diff_options: diff_options, diff_refs: diff_refs)
+ @diffs = Compare.decorate(@compare, @project).diff_file_collection(diff_options: diff_options, diff_refs: diff_refs)
@diff_notes_disabled = true
@grouped_diff_discussions = {}