diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2016-07-20 18:25:36 +0200 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2016-08-03 07:00:19 +0200 |
commit | cd7c2cb6ddd4d9c9f9bdae00c887c0022c121c17 (patch) | |
tree | fad9386721cc514f28a011ef734b8791fc1c13be /app/controllers/projects/commit_controller.rb | |
parent | 195b20e1b9ff08437c5a436dc14f04e7f1bee807 (diff) | |
download | gitlab-ce-cd7c2cb6ddd4d9c9f9bdae00c887c0022c121c17.tar.gz |
Cache highlighted diff lines for merge requests
Introducing the concept of SafeDiffs which relates
diffs with UI highlighting.
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 7ae034f9398..6060b6e55bc 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -28,7 +28,7 @@ class Projects::CommitController < Projects::ApplicationController end def diff_for_path - render_diff_for_path(@diffs, @commit.diff_refs, @project) + render_diff_for_path(SafeDiffs::Commit.new(@commit, diff_options: diff_options)) end def builds @@ -110,7 +110,7 @@ class Projects::CommitController < Projects::ApplicationController opts = diff_options opts[:ignore_whitespace_change] = true if params[:format] == 'diff' - @diffs = commit.diffs(opts) + @diffs = SafeDiffs::Commit.new(commit, diff_options: opts) @notes_count = commit.notes.count end |