Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r--app/controllers/projects/commit_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb
index 0c26b402876..2b2764d2e34 100644
--- a/app/controllers/projects/commit_controller.rb
+++ b/app/controllers/projects/commit_controller.rb
@@ -31,7 +31,7 @@ class Projects::CommitController < Projects::ApplicationController
respond_to do |format|
format.html do
- render
+ render locals: { pagination_params: params.permit(:page) }
end
format.diff do
send_git_diff(@project.repository, @commit.diff_refs)
@@ -106,6 +106,8 @@ class Projects::CommitController < Projects::ApplicationController
end
def revert
+ return render_404 unless @commit
+
assign_change_commit_vars
return render_404 if @start_branch.blank?
@@ -117,6 +119,8 @@ class Projects::CommitController < Projects::ApplicationController
end
def cherry_pick
+ return render_404 unless @commit
+
assign_change_commit_vars
return render_404 if @start_branch.blank?