summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gitlab/git/repository.rb19
1 files changed, 5 insertions, 14 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 5ff90b7c4ea..b7010af96e8 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -1458,17 +1458,6 @@ module Gitlab
end
end
- def gitaly_commit_count(ref, options)
- max_count = options[:max_count]
- count = gitaly_commit_client.commit_count(ref, options)
-
- if max_count && count > max_count
- max_count
- else
- count
- end
- end
-
def log_using_shell?(options)
options[:path].present? ||
options[:disable_walk] ||
@@ -1695,12 +1684,14 @@ module Gitlab
from = options[:from]
to = options[:to]
- right_count = gitaly_commit_count("#{from}..#{to}", options)
- left_count = gitaly_commit_count("#{to}..#{from}", options)
+ right_count = gitaly_commit_client
+ .commit_count("#{from}..#{to}", options)
+ left_count = gitaly_commit_client
+ .commit_count("#{to}..#{from}", options)
[left_count, right_count]
else
- gitaly_commit_count(options[:ref], options)
+ gitaly_commit_client.commit_count(options[:ref], options)
end
end