Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/git_access.rb')
-rw-r--r--lib/gitlab/git_access.rb17
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