summaryrefslogtreecommitdiff
path: root/app/controllers/concerns
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-08-11 13:35:35 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-08-11 13:35:35 +0800
commit0b52517049fc8ac01407018c8a6225d7788861a3 (patch)
tree3c8c0cb1bdda06daa685c5f945ea99dd0c91dfc5 /app/controllers/concerns
parent5607fdf9fe51da75099effbaf8277c98290d6d96 (diff)
parent87b07f6a65a35a53bb1afed9d2a7da00caa8d59f (diff)
downloadgitlab-ce-0b52517049fc8ac01407018c8a6225d7788861a3.tar.gz
Merge remote-tracking branch 'upstream/master' into pipeline-hooks-without-slack
* upstream/master: (233 commits) Fix awardable button mutuality loading spinners Update CHANGELOG for 8.10.5 Clean up project destruction Small refactor of doc/development/README.md Avoid commit lookup on diff_helper Removed extra newline from redis_spec.rb Used cached value of project count to reduce DB load Remove duplicate link_to statements Mention add_column_with_default in downtime guide Add missing space to generic badge template Rename `run` task helper method to prevent conflict with StateMachine Add a method in Project to return a cached value of total count of projects spellcheck Add svg guidelines to ui guide Add Changelog entry for Grape upgrade [ci skip] Fix Grape tests. Retain old behavior Update Grape from 0.13.0 to 0.15.0. adds second batch of tests changed to active tense fixes part1 of files to start using active tense ...
Diffstat (limited to 'app/controllers/concerns')
-rw-r--r--app/controllers/concerns/diff_for_path.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/concerns/diff_for_path.rb b/app/controllers/concerns/diff_for_path.rb
index 026d8b2e1e0..aeec3009f15 100644
--- a/app/controllers/concerns/diff_for_path.rb
+++ b/app/controllers/concerns/diff_for_path.rb
@@ -1,8 +1,8 @@
module DiffForPath
extend ActiveSupport::Concern
- def render_diff_for_path(diffs, diff_refs, project)
- diff_file = safe_diff_files(diffs, diff_refs: diff_refs, repository: project.repository).find do |diff|
+ def render_diff_for_path(diffs)
+ diff_file = diffs.diff_files.find do |diff|
diff.old_path == params[:old_path] && diff.new_path == params[:new_path]
end
@@ -14,7 +14,7 @@ module DiffForPath
locals = {
diff_file: diff_file,
diff_commit: diff_commit,
- diff_refs: diff_refs,
+ diff_refs: diffs.diff_refs,
blob: blob,
project: project
}