summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-07-28 17:03:17 +0000
committerRobert Speicher <robert@gitlab.com>2017-07-28 17:03:17 +0000
commit0bb58ff88576f2483110fed5c0d6631aada4b8df (patch)
treee93b57f109c17d8c4d7557ed7c2e0e1d63248822 /lib
parent8b68b69572cf2aa47ba497c119470131085f95f0 (diff)
parent0e355e5c9293c712b5df65896371af0ba71c19b2 (diff)
downloadgitlab-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.rb4
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)