Commit c476395b authored by Rubén Dávila's avatar Rubén Dávila

Reuse existent vars with ref and path. #3945

parent 80a4c808
...@@ -65,10 +65,8 @@ class Projects::BlobController < Projects::ApplicationController ...@@ -65,10 +65,8 @@ class Projects::BlobController < Projects::ApplicationController
end end
def diff def diff
ref, file_name = params[:id].split('/', 2)
@form = UnfoldForm.new(params) @form = UnfoldForm.new(params)
@lines = Gitlab::Diff::Highlight.process_file(repository, ref, file_name) @lines = Gitlab::Diff::Highlight.process_file(repository, @ref, @path)
@lines = @lines[@form.since - 1..@form.to - 1] @lines = @lines[@form.since - 1..@form.to - 1]
if @form.bottom? if @form.bottom?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment