diff options
| author | Robert Speicher <robert@gitlab.com> | 2017-07-28 17:03:17 +0000 |
|---|---|---|
| committer | Robert Speicher <robert@gitlab.com> | 2017-07-28 17:03:17 +0000 |
| commit | 0bb58ff88576f2483110fed5c0d6631aada4b8df (patch) | |
| tree | e93b57f109c17d8c4d7557ed7c2e0e1d63248822 /lib | |
| parent | 8b68b69572cf2aa47ba497c119470131085f95f0 (diff) | |
| parent | 0e355e5c9293c712b5df65896371af0ba71c19b2 (diff) | |
| download | gitlab-ce-0bb58ff88576f2483110fed5c0d6631aada4b8df.tar.gz | |
Merge branch 'dm-large-push-performance' into 'master'
Load and process at most 100 commits when pushing into default branch
Closes #35531
See merge request !13132
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/gitlab/data_builder/push.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/data_builder/push.rb b/lib/gitlab/data_builder/push.rb index 8c8729b6557..5c5f507d44d 100644 --- a/lib/gitlab/data_builder/push.rb +++ b/lib/gitlab/data_builder/push.rb @@ -24,11 +24,11 @@ module Gitlab # total_commits_count: Fixnum # } # - def build(project, user, oldrev, newrev, ref, commits = [], message = nil) + def build(project, user, oldrev, newrev, ref, commits = [], message = nil, commits_count: nil) commits = Array(commits) # Total commits count - commits_count = commits.size + commits_count ||= commits.size # Get latest 20 commits ASC commits_limited = commits.last(20) |
