From 3792d624b692752cdfa5c3adc990a6e5200f90b5 Mon Sep 17 00:00:00 2001 From: nathanvda Date: Sun, 3 Jun 2012 03:24:59 +0200 Subject: [PATCH] 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. --- app/views/commits/_head.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/commits/_head.html.haml b/app/views/commits/_head.html.haml index 23ad920..6c26113 100644 --- a/app/views/commits/_head.html.haml +++ b/app/views/commits/_head.html.haml @@ -13,12 +13,12 @@ %li{:class => "#{branches_tab_class}"} = link_to project_repository_path(@project) do Branches - %span.number= @project.repo.branches.count + %span.number= @project.repo.branch_count %li{:class => "#{'active' if current_page?(tags_project_repository_path(@project)) }"} = link_to tags_project_repository_path(@project) do Tags - %span.number= @project.repo.tags.count + %span.number= @project.repo.tag_count - if current_page?(project_commits_path(@project)) && current_user.private_token -- libgit2 0.21.2