diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-04-24 16:57:35 +0200 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-04-25 14:51:04 +0200 |
commit | 5cd57cf250e25d99b73fd372716a2719016a34b2 (patch) | |
tree | 6541cbdcd7978b5c842ca63ad9bac39afa359d77 /lib/gitlab/git | |
parent | 5beb4ddebfa23b288dc088c7175c2456d411f4f1 (diff) | |
download | gitlab-ce-5cd57cf250e25d99b73fd372716a2719016a34b2.tar.gz |
Repository#exists? can only be queried with Gitaly
Has been in opt out for 5 months, and within GitLab been in production
for longer than that.
No code needs to be migrated as this is implemented in GoLang over at
Gitaly.
Closes https://gitlab.com/gitlab-org/gitaly/issues/314
Diffstat (limited to 'lib/gitlab/git')
-rw-r--r-- | lib/gitlab/git/repository.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index 5a6e2e0b937..0d07fb85213 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -142,15 +142,7 @@ module Gitlab end def exists? - Gitlab::GitalyClient.migrate(:repository_exists, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |enabled| - if enabled - gitaly_repository_client.exists? - else - circuit_breaker.perform do - File.exist?(File.join(path, 'refs')) - end - end - end + gitaly_repository_client.exists? end # Returns an Array of branch names |