summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-04-09 22:27:45 -0500
committerDouwe Maan <douwe@selenight.nl>2017-04-09 22:27:45 -0500
commit48a0e9f6aece36e83e3ffde5be42f964b5362221 (patch)
treef61b44e324bc3ced058c5cf11dc114f3ec8e778d /app/controllers
parent1817f877e19628417dd8209f070386b111de59c4 (diff)
downloadgitlab-ce-48a0e9f6aece36e83e3ffde5be42f964b5362221.tar.gz
Fix specs
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/compare_controller.rb1
-rwxr-xr-xapp/controllers/projects/merge_requests_controller.rb10
2 files changed, 6 insertions, 5 deletions
diff --git a/app/controllers/projects/compare_controller.rb b/app/controllers/projects/compare_controller.rb
index c6651254d70..008d2f5815f 100644
--- a/app/controllers/projects/compare_controller.rb
+++ b/app/controllers/projects/compare_controller.rb
@@ -61,7 +61,6 @@ class Projects::CompareController < Projects::ApplicationController
@environment = EnvironmentsFinder.new(@project, current_user, environment_params).execute.last
@diff_notes_disabled = true
- @grouped_diff_discussions = {}
end
end
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index 87d684e5c7a..224b44db397 100755
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -122,7 +122,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
build_merge_request
@diffs = @merge_request.diffs(diff_options)
@diff_notes_disabled = true
- @grouped_diff_discussions = {}
end
define_commit_vars
@@ -576,10 +575,13 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@comparable_diffs = @merge_request_diffs.select { |diff| diff.id < @merge_request_diff.id }
if params[:start_sha].present?
- start_sha = params[:start_sha]
- @start_version = @comparable_diffs.find { |diff| diff.head_commit_sha == start_sha }
+ @start_sha = params[:start_sha]
+ @start_version = @comparable_diffs.find { |diff| diff.head_commit_sha == @start_sha }
- @start_sha = start_sha if @start_version
+ unless @start_version
+ @start_sha = @merge_request_diff.head_commit_sha
+ @start_version = @merge_request_diff
+ end
end
@diffs =