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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 10:08:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 10:08:36 +0300
commit48aff82709769b098321c738f3444b9bdaa694c6 (patch)
treee00c7c43e2d9b603a5a6af576b1685e400410dee /lib/gitlab/repository_size_checker.rb
parent879f5329ee916a948223f8f43d77fba4da6cd028 (diff)
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'lib/gitlab/repository_size_checker.rb')
-rw-r--r--lib/gitlab/repository_size_checker.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/gitlab/repository_size_checker.rb b/lib/gitlab/repository_size_checker.rb
index 82c57f7a07d..03d9f961dd9 100644
--- a/lib/gitlab/repository_size_checker.rb
+++ b/lib/gitlab/repository_size_checker.rb
@@ -6,9 +6,10 @@ module Gitlab
attr_reader :limit
# @param current_size_proc [Proc] returns repository size in bytes
- def initialize(current_size_proc:, limit:, enabled: true)
+ def initialize(current_size_proc:, limit:, namespace:, enabled: true)
@current_size_proc = current_size_proc
@limit = limit
+ @namespace = namespace
@enabled = enabled && limit != 0
end
@@ -40,7 +41,13 @@ module Gitlab
end
def error_message
- @error_message_object ||= Gitlab::RepositorySizeErrorMessage.new(self)
+ @error_message_object ||= ::Gitlab::RepositorySizeErrorMessage.new(self)
end
+
+ private
+
+ attr_reader :namespace
end
end
+
+Gitlab::RepositorySizeChecker.prepend_if_ee('EE::Gitlab::RepositorySizeChecker')