summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRubén Dávila <rdavila84@gmail.com>2016-01-12 11:14:41 -0500
committerRubén Dávila <rdavila84@gmail.com>2016-01-12 11:14:41 -0500
commitc476395b4d8b78cfc7431153a144ffccbd414c61 (patch)
treecc054d0e095329c984da18437757ca4f6d53ca6e
parent80a4c808b1e5d331833f7b2ed531cb4fc81c7ef3 (diff)
downloadgitlab-ce-c476395b4d8b78cfc7431153a144ffccbd414c61.tar.gz
Reuse existent vars with ref and path. #3945
-rw-r--r--app/controllers/projects/blob_controller.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb
index 6aa602321f4..6ca3a636359 100644
--- a/app/controllers/projects/blob_controller.rb
+++ b/app/controllers/projects/blob_controller.rb
@@ -65,10 +65,8 @@ class Projects::BlobController < Projects::ApplicationController
end
def diff
- ref, file_name = params[:id].split('/', 2)
-
@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]
if @form.bottom?