diff options
author | Adam Niedzielski <adamsunday@gmail.com> | 2016-11-18 14:33:42 +0100 |
---|---|---|
committer | Adam Niedzielski <adamsunday@gmail.com> | 2016-11-21 13:26:26 +0100 |
commit | e22514fd4c54ec05e3272afdba5cba27d5b70516 (patch) | |
tree | 04f55603e0bef6da1ffc7e72008643514dea0265 /app/controllers/projects | |
parent | 9e9965ba5ce5a2acca97325412c63eed398ef80b (diff) | |
download | gitlab-ce-e22514fd4c54ec05e3272afdba5cba27d5b70516.tar.gz |
Hide empty merge request diffs when comparing versions
Diffstat (limited to 'app/controllers/projects')
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 036fde87619..016d16721f6 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -82,12 +82,12 @@ class Projects::MergeRequestsController < Projects::ApplicationController @merge_request_diff = if params[:diff_id] - @merge_request.merge_request_diffs.find(params[:diff_id]) + @merge_request.merge_request_diffs.viewable.find(params[:diff_id]) else @merge_request.merge_request_diff end - @merge_request_diffs = @merge_request.merge_request_diffs.select_without_diff + @merge_request_diffs = @merge_request.merge_request_diffs.viewable.select_without_diff @comparable_diffs = @merge_request_diffs.select { |diff| diff.id < @merge_request_diff.id } if params[:start_sha].present? |