diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/merge_requests/diffs_controller.rb | 5 | ||||
-rw-r--r-- | app/controllers/projects_controller.rb | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/projects/merge_requests/diffs_controller.rb b/app/controllers/projects/merge_requests/diffs_controller.rb index 3eaabfbf33e..f125952cb97 100644 --- a/app/controllers/projects/merge_requests/diffs_controller.rb +++ b/app/controllers/projects/merge_requests/diffs_controller.rb @@ -163,7 +163,10 @@ class Projects::MergeRequests::DiffsController < Projects::MergeRequests::Applic end def render_merge_ref_head_diff? - Gitlab::Utils.to_boolean(params[:diff_head]) && @merge_request.diffable_merge_ref? && @start_sha.nil? + params[:diff_id].blank? && + Gitlab::Utils.to_boolean(params[:diff_head]) && + @merge_request.diffable_merge_ref? && + @start_sha.nil? end def note_positions diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index e66893ac269..fb977a5ee42 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -510,7 +510,7 @@ class ProjectsController < Projects::ApplicationController # `project` calls `find_routable!`, so this will trigger the usual not-found # behaviour when the user isn't authorized to see the project - return unless project + return if project.nil? || performed? redirect_to(request.original_url.sub(%r{\.git/?\Z}, '')) end |