diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-11-28 21:43:31 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-11-30 16:03:28 +0800 |
commit | 4925ec50877c9bf1338d41a7676b3644f18370f7 (patch) | |
tree | acf74aa4177d87d74be41921eda1a41d8ac5b94e /lib | |
parent | 17c53d7d0dcc6739691f1298ddd0c254c9614571 (diff) | |
download | gitlab-ce-4925ec50877c9bf1338d41a7676b3644f18370f7.tar.gz |
We could simply count the commits
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/repository.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index d399636bb28..fb9c3e92d3f 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -505,7 +505,7 @@ module Gitlab # Counts the amount of commits between `from` and `to`. def count_commits_between(from, to) - Commit.between(self, from, to).size + count_commits(ref: "#{from}..#{to}") end # Returns the SHA of the most recent common ancestor of +from+ and +to+ |