summaryrefslogtreecommitdiff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-25 00:08:11 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-25 00:08:11 +0000
commit23bc19cb73aad969c9636b8b935111645e809e54 (patch)
tree887c9e014f8345f577769db4f75315ca59853b98 /app/models/concerns
parentc4db541c1b2c97ab1eda354ea3899489fe5c33e5 (diff)
downloadgitlab-ce-23bc19cb73aad969c9636b8b935111645e809e54.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/has_repository.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/concerns/has_repository.rb b/app/models/concerns/has_repository.rb
index cc792eab2e0..d50e088944e 100644
--- a/app/models/concerns/has_repository.rb
+++ b/app/models/concerns/has_repository.rb
@@ -15,6 +15,15 @@ module HasRepository
delegate :base_dir, :disk_path, to: :storage
+ class_methods do
+ def pick_repository_storage
+ # We need to ensure application settings are fresh when we pick
+ # a repository storage to use.
+ Gitlab::CurrentSettings.expire_current_application_settings
+ Gitlab::CurrentSettings.pick_repository_storage
+ end
+ end
+
def valid_repo?
repository.exists?
rescue