Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b7ac0167
Commit
b7ac0167
authored
Apr 05, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
3825c006
8c288138
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
0 deletions
+15
-0
app/controllers/projects/commits_controller.rb
app/controllers/projects/commits_controller.rb
+2
-0
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+2
-0
changelogs/unreleased/allow-ref-name-caching-projects-controller.yml
...unreleased/allow-ref-name-caching-projects-controller.yml
+5
-0
spec/controllers/projects/commits_controller_spec.rb
spec/controllers/projects/commits_controller_spec.rb
+2
-0
spec/controllers/projects_controller_spec.rb
spec/controllers/projects_controller_spec.rb
+4
-0
No files found.
app/controllers/projects/commits_controller.rb
View file @
b7ac0167
...
...
@@ -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
...
...
app/controllers/projects_controller.rb
View file @
b7ac0167
...
...
@@ -26,6 +26,8 @@ class ProjectsController < Projects::ApplicationController
before_action
:authorize_admin_project!
,
only:
[
:edit
,
:update
,
:housekeeping
,
:download_export
,
:export
,
:remove_export
,
:generate_new_export
]
before_action
:event_filter
,
only:
[
:show
,
:activity
]
around_action
:allow_gitaly_ref_name_caching
,
only:
[
:index
,
:show
]
layout
:determine_layout
def
index
...
...
changelogs/unreleased/allow-ref-name-caching-projects-controller.yml
0 → 100644
View file @
b7ac0167
---
title
:
Enable FindCommit caching for project and commits pages
merge_request
:
27048
author
:
type
:
performance
spec/controllers/projects/commits_controller_spec.rb
View file @
b7ac0167
...
...
@@ -113,6 +113,8 @@ describe Projects::CommitsController do
render_views
before
do
expect
(
::
Gitlab
::
GitalyClient
).
to
receive
(
:allow_ref_name_caching
).
and_call_original
unless
id
.
include?
(
' '
)
get
(
:signatures
,
params:
{
namespace_id:
project
.
namespace
,
...
...
spec/controllers/projects_controller_spec.rb
View file @
b7ac0167
...
...
@@ -78,6 +78,10 @@ describe ProjectsController do
end
context
"user has access to project"
do
before
do
expect
(
::
Gitlab
::
GitalyClient
).
to
receive
(
:allow_ref_name_caching
).
and_call_original
end
context
"and does not have notification setting"
do
it
"initializes notification as disabled"
do
get
:show
,
params:
{
namespace_id:
public_project
.
namespace
,
id:
public_project
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment