diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-25 00:08:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-25 00:08:11 +0000 |
commit | 23bc19cb73aad969c9636b8b935111645e809e54 (patch) | |
tree | 887c9e014f8345f577769db4f75315ca59853b98 /app/models/concerns | |
parent | c4db541c1b2c97ab1eda354ea3899489fe5c33e5 (diff) | |
download | gitlab-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.rb | 9 |
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 |