Commit a35a12980eacd1d4b1724bbd981455991f29f93d
Exists in
master
and in
4 other branches
Merge pull request #887 from nathanvda/improve_tag_count
Improve performance when handling large repo's
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
Gemfile
@@ -9,7 +9,7 @@ gem "stamp" | @@ -9,7 +9,7 @@ gem "stamp" | ||
9 | gem "kaminari" | 9 | gem "kaminari" |
10 | gem "haml-rails" | 10 | gem "haml-rails" |
11 | gem "jquery-rails" | 11 | gem "jquery-rails" |
12 | -gem "grit", :git => "https://github.com/gitlabhq/grit.git", :ref => "810e3c11787e9d84c5925a7edc3264db0f04bb49" | 12 | +gem "grit", :git => "https://github.com/gitlabhq/grit.git", :ref => "9536f306645f2d6b1f993ae02d3a29893ba8881f" |
13 | gem "gitolite", :git => "https://github.com/gitlabhq/gitolite-client.git", :ref => "9b715ca8bab6529f6c92204a25f84d12f25a6eb0" | 13 | gem "gitolite", :git => "https://github.com/gitlabhq/gitolite-client.git", :ref => "9b715ca8bab6529f6c92204a25f84d12f25a6eb0" |
14 | gem "carrierwave" | 14 | gem "carrierwave" |
15 | gem "six" | 15 | gem "six" |
app/views/commits/_head.html.haml
@@ -13,12 +13,12 @@ | @@ -13,12 +13,12 @@ | ||
13 | %li{:class => "#{branches_tab_class}"} | 13 | %li{:class => "#{branches_tab_class}"} |
14 | = link_to project_repository_path(@project) do | 14 | = link_to project_repository_path(@project) do |
15 | Branches | 15 | Branches |
16 | - %span.number= @project.repo.branches.count | 16 | + %span.number= @project.repo.branch_count |
17 | 17 | ||
18 | %li{:class => "#{'active' if current_page?(tags_project_repository_path(@project)) }"} | 18 | %li{:class => "#{'active' if current_page?(tags_project_repository_path(@project)) }"} |
19 | = link_to tags_project_repository_path(@project) do | 19 | = link_to tags_project_repository_path(@project) do |
20 | Tags | 20 | Tags |
21 | - %span.number= @project.repo.tags.count | 21 | + %span.number= @project.repo.tag_count |
22 | 22 | ||
23 | 23 | ||
24 | - if current_page?(project_commits_path(@project)) && current_user.private_token | 24 | - if current_page?(project_commits_path(@project)) && current_user.private_token |