Commit 3792d624 authored by nathanvda's avatar nathanvda

Use the faster alternative methods in grit to count tags and branches (which I...

Use the faster alternative methods in grit to count tags and branches (which I added). This is much faster in all cases, but especially on large repositories the difference should be obvious.
parent cbea0af2
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
%li{:class => "#{branches_tab_class}"} %li{:class => "#{branches_tab_class}"}
= link_to project_repository_path(@project) do = link_to project_repository_path(@project) do
Branches Branches
%span.number= @project.repo.branches.count %span.number= @project.repo.branch_count
%li{:class => "#{'active' if current_page?(tags_project_repository_path(@project)) }"} %li{:class => "#{'active' if current_page?(tags_project_repository_path(@project)) }"}
= link_to tags_project_repository_path(@project) do = link_to tags_project_repository_path(@project) do
Tags Tags
%span.number= @project.repo.tags.count %span.number= @project.repo.tag_count
- if current_page?(project_commits_path(@project)) && current_user.private_token - if current_page?(project_commits_path(@project)) && current_user.private_token
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment