diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-05-04 17:27:47 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-05-04 17:27:47 +0200 |
commit | 6a8359f3d3be01af6f5b124b61af7ee1c77c17d0 (patch) | |
tree | 9e972713fc223d7a466ea2b1601a093d719f0817 /app/models | |
parent | 72e4bd5fc40c3b61792bf5f8897ab881775c7146 (diff) | |
parent | c4b9bd041321df25764ad1de90f89b1f0dda9f33 (diff) | |
download | gitlab-ce-6a8359f3d3be01af6f5b124b61af7ee1c77c17d0.tar.gz |
Merge branch 'pacoguzman/gitlab-ce-15001-since-and-until-operators-api-commits'
# Conflicts:
# Gemfile.lock
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/repository.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index b4319297e43..ddffc1f110a 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -87,13 +87,15 @@ class Repository nil end - def commits(ref, path = nil, limit = nil, offset = nil, skip_merges = false) + def commits(ref, path: nil, limit: nil, offset: nil, skip_merges: false, after: nil, before: nil) options = { repo: raw_repository, ref: ref, path: path, limit: limit, offset: offset, + after: after, + before: before, # --follow doesn't play well with --skip. See: # https://gitlab.com/gitlab-org/gitlab-ce/issues/3574#note_3040520 follow: false, @@ -575,7 +577,7 @@ class Repository end def contributors - commits = self.commits(nil, nil, 2000, 0, true) + commits = self.commits(nil, limit: 2000, offset: 0, skip_merges: true) commits.group_by(&:author_email).map do |email, commits| contributor = Gitlab::Contributor.new |