Commit 7ed935b6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Use gitlab_git to get commit_count in repo. It allows get commits count for...

Use gitlab_git to get commit_count in repo. It allows get commits count for git repos with 100k+ commits
Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 5b219355
......@@ -30,7 +30,7 @@ gem 'omniauth-github'
# Extracting information from a git repository
# Provide access to Gitlab::Git library
gem "gitlab_git", '~> 5.8'
gem "gitlab_git", '~> 6.0'
# Ruby/Rack Git Smart-HTTP Server Handler
gem 'gitlab-grack', '~> 2.0.0.pre', require: 'grack'
......
......@@ -175,7 +175,7 @@ GEM
mime-types (~> 1.19)
gitlab_emoji (0.0.1.1)
emoji (~> 1.0.1)
gitlab_git (5.9.0)
gitlab_git (6.0.0)
activesupport (~> 4.0)
charlock_holmes (~> 0.6)
gitlab-grit (~> 2.6)
......@@ -601,7 +601,7 @@ DEPENDENCIES
gitlab-grack (~> 2.0.0.pre)
gitlab-linguist (~> 3.0.0)
gitlab_emoji (~> 0.0.1.1)
gitlab_git (~> 5.8)
gitlab_git (~> 6.0)
gitlab_meta (= 6.0)
gitlab_omniauth-ldap (= 1.0.4)
gollum-lib (~> 3.0.0)
......
......@@ -106,7 +106,7 @@ class Repository
def commit_count
Rails.cache.fetch(cache_key(:commit_count)) do
begin
raw_repository.raw.commit_count(self.root_ref)
raw_repository.commit_count(self.root_ref)
rescue
0
end
......
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