diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2016-08-10 12:28:42 +0300 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2016-08-10 14:09:07 +0300 |
commit | 5689e8a0827eb9f09b071bbd4dc74dc2cb0a3e7d (patch) | |
tree | 25bc26dcba645df2bcdef62f2808b0d710689c50 /app/helpers/diff_helper.rb | |
parent | 023d4812586faa24cce69715c606b4bf236956e9 (diff) |
Avoid commit lookup on diff_helper
Diffstat (limited to 'app/helpers/diff_helper.rb')
-rw-r--r-- | app/helpers/diff_helper.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb index f3c9ea074b4..0725c3f4c56 100644 --- a/app/helpers/diff_helper.rb +++ b/app/helpers/diff_helper.rb @@ -109,11 +109,10 @@ module DiffHelper end end - def diff_file_html_data(project, diff_file) - commit = commit_for_diff(diff_file) + def diff_file_html_data(project, diff_file_path, diff_commit_id) { blob_diff_path: namespace_project_blob_diff_path(project.namespace, project, - tree_join(commit.id, diff_file.file_path)), + tree_join(diff_commit_id, diff_file_path)), view: diff_view } end |