diff options
author | Nick Thomas <nick@gitlab.com> | 2019-08-14 17:38:28 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-08-14 17:38:28 +0300 |
commit | 3cd40c4a807fef5f99c60853ab81f8729405e315 (patch) | |
tree | 2d644a6b3d4a2a57f4d94117b15b3a31cae1c97d /lib | |
parent | 03c8bb125573d3910689d10b979a6aa59b680ff6 (diff) | |
parent | 4e2bb4e5e7df1273a4d2fdd370b6c17a27c394d8 (diff) |
Merge branch 'sh-optimize-commit-deltas-post-receive' into 'master'
Reduce Gitaly calls in PostReceive
Closes #65878
See merge request gitlab-org/gitlab-ce!31741
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/data_builder/push.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/gitlab/data_builder/push.rb b/lib/gitlab/data_builder/push.rb index 40bda3410e1..37fadb47736 100644 --- a/lib/gitlab/data_builder/push.rb +++ b/lib/gitlab/data_builder/push.rb @@ -60,7 +60,8 @@ module Gitlab # rubocop:disable Metrics/ParameterLists def build( project:, user:, ref:, oldrev: nil, newrev: nil, - commits: [], commits_count: nil, message: nil, push_options: {}) + commits: [], commits_count: nil, message: nil, push_options: {}, + with_changed_files: true) commits = Array(commits) @@ -75,7 +76,7 @@ module Gitlab # n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/38259 commit_attrs = Gitlab::GitalyClient.allow_n_plus_1_calls do commits_limited.map do |commit| - commit.hook_attrs(with_changed_files: true) + commit.hook_attrs(with_changed_files: with_changed_files) end end |