summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-08-16 08:27:47 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-08-16 08:27:47 +0000
commit0a666b2cb1020df4b8f7b71041b6bd109b49656a (patch)
tree7da11e1a07d61da66979b0d84f5d8d1c7c08fb92
parent6ac7162395a2651b992cf8c25436e20fde92252d (diff)
parent31749779da2fdc7834df5e44a5ba16789de6bb3e (diff)
downloadgitlab-ce-50326-ocd-pipeline.tar.gz
Merge branch 'zj-remove-flags-find-all-brances' into 'master'50326-ocd-pipeline
Remove feature flag for FindAllRemoteBranches Closes gitaly#1243 See merge request gitlab-org/gitlab-ce!21234
-rw-r--r--lib/gitlab/git/repository_mirroring.rb29
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