diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /lib/gitlab/git_access.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'lib/gitlab/git_access.rb')
-rw-r--r-- | lib/gitlab/git_access.rb | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb index 642a77ced11..759c6b93d9a 100644 --- a/lib/gitlab/git_access.rb +++ b/lib/gitlab/git_access.rb @@ -498,21 +498,10 @@ module Gitlab end def check_changes_size - changes_size = - if Feature.enabled?(:git_access_batched_changes_size, project, default_enabled: :yaml) - revs = ['--not', '--all', '--not'] - revs += changes_list.map { |change| change[:newrev] } + revs = ['--not', '--all', '--not'] + revs += changes_list.map { |change| change[:newrev] } - repository.blobs(revs).sum(&:size) - else - changes_size = 0 - - changes_list.each do |change| - changes_size += repository.new_blobs(change[:newrev]).sum(&:size) - end - - changes_size - end + changes_size = repository.blobs(revs).sum(&:size) check_size_against_limit(changes_size) end |