diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-08-16 09:42:31 +0200 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-08-16 09:42:31 +0200 |
commit | 31749779da2fdc7834df5e44a5ba16789de6bb3e (patch) | |
tree | 7d7c9cba4d175a7a64b8e56aa88b2180812bdd48 | |
parent | f415b07db4637f2c122b161da23b42ea1ef5d16d (diff) | |
download | gitlab-ce-31749779da2fdc7834df5e44a5ba16789de6bb3e.tar.gz |
Remove feature flag for FindAllRemoteBranches
Acceptance testing done through:
https://gitlab.com/gitlab-org/gitaly/issues/1312
Relatively short AT period, but given its not a hard RPC, nor anything
funky is going on, I felt that this was decent enough to remove the
feature flag.
Closes https://gitlab.com/gitlab-org/gitaly/issues/1243
-rw-r--r-- | lib/gitlab/git/repository_mirroring.rb | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/lib/gitlab/git/repository_mirroring.rb b/lib/gitlab/git/repository_mirroring.rb index 65eb5cc18cf..752a91fbb60 100644 --- a/lib/gitlab/git/repository_mirroring.rb +++ b/lib/gitlab/git/repository_mirroring.rb @@ -2,34 +2,7 @@ module Gitlab module Git module RepositoryMirroring def remote_branches(remote_name) - gitaly_migrate(:ref_find_all_remote_branches) do |is_enabled| - if is_enabled - gitaly_ref_client.remote_branches(remote_name) - else - Gitlab::GitalyClient::StorageSettings.allow_disk_access do - rugged_remote_branches(remote_name) - end - end - end - end - - private - - def rugged_remote_branches(remote_name) - branches = [] - - rugged.references.each("refs/remotes/#{remote_name}/*").map do |ref| - name = ref.name.sub(%r{\Arefs/remotes/#{remote_name}/}, '') - - begin - target_commit = Gitlab::Git::Commit.find(self, ref.target.oid) - branches << Gitlab::Git::Branch.new(self, name, ref.target, target_commit) - rescue Rugged::ReferenceError - # Omit invalid branch - end - end - - branches + gitaly_ref_client.remote_branches(remote_name) end end end |