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:
authorStan Hu <stanhu@gmail.com>2019-04-05 14:33:01 +0300
committerStan Hu <stanhu@gmail.com>2019-04-05 14:52:42 +0300
commitf1dce2160956f27fecc4a59d36d1e1e03903a84b (patch)
treeeb046c94683963261349d059978bb8b0af986027 /app/controllers/projects/commits_controller.rb
parent3962b00b4bdea67107b9f43e1c44e9bacb98560d (diff)
Enable FindCommit caching for project and commits pages
This reduces a handful of duplicate FindCommit calls while viewing the projects and commits pages.
Diffstat (limited to 'app/controllers/projects/commits_controller.rb')
-rw-r--r--app/controllers/projects/commits_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/projects/commits_controller.rb b/app/controllers/projects/commits_controller.rb
index 2510a31c9b3..a49ede04de7 100644
--- a/app/controllers/projects/commits_controller.rb
+++ b/app/controllers/projects/commits_controller.rb
@@ -14,6 +14,8 @@ class Projects::CommitsController < Projects::ApplicationController
before_action :validate_ref!, except: :commits_root
before_action :set_commits, except: :commits_root
+ around_action :allow_gitaly_ref_name_caching
+
def commits_root
redirect_to project_commits_path(@project, @project.default_branch)
end