BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
5d33af5e
Commit
5d33af5e
authored
Jun 16, 2016
by
Paco Guzman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Git cached counters on project show page
Besides when building the repository cache we cache those git counters too
parent
db66312c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
CHANGELOG
CHANGELOG
+1
-0
repository.rb
app/models/repository.rb
+1
-1
show.html.haml
app/views/projects/show.html.haml
+2
-2
No files found.
CHANGELOG
View file @
5d33af5e
...
...
@@ -110,6 +110,7 @@ v 8.9.0 (unreleased)
- Various associations are now eager loaded when parsing issue references to reduce the number of queries executed
- Set inverse_of for Project/Service association to reduce the number of queries
- Update tanuki logo highlight/loading colors
- Use Git cached counters for branches and tags on project page
v 8.8.5
- Import GitHub repositories respecting the API rate limit !4166
...
...
app/models/repository.rb
View file @
5d33af5e
...
...
@@ -243,7 +243,7 @@ class Repository
end
def
cache_keys
%i(size branch_names tag_names commit_count
%i(size branch_names tag_names
branch_count tag_count
commit_count
readme version contribution_guide changelog
license_blob license_key gitignore)
end
...
...
app/views/projects/show.html.haml
View file @
5d33af5e
...
...
@@ -23,10 +23,10 @@
#{
'Commit'
.
pluralize
(
@project
.
commit_count
)
}
(
#{
number_with_delimiter
(
@project
.
commit_count
)
}
)
%li
=
link_to
namespace_project_branches_path
(
@project
.
namespace
,
@project
)
do
#{
'Branch'
.
pluralize
(
@repository
.
branch_
names
.
count
)
}
(
#{
number_with_delimiter
(
@repository
.
branch_names
.
count
)
}
)
#{
'Branch'
.
pluralize
(
@repository
.
branch_
count
)
}
(
#{
number_with_delimiter
(
@repository
.
branch_
count
)
}
)
%li
=
link_to
namespace_project_tags_path
(
@project
.
namespace
,
@project
)
do
#{
'Tag'
.
pluralize
(
@repository
.
tag_
names
.
count
)
}
(
#{
number_with_delimiter
(
@repository
.
tag_names
.
count
)
}
)
#{
'Tag'
.
pluralize
(
@repository
.
tag_
count
)
}
(
#{
number_with_delimiter
(
@repository
.
tag_
count
)
}
)
-
if
default_project_view
!=
'readme'
&&
@repository
.
readme
%li
...
...
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