Skip to content
Snippets Groups Projects
Unverified Commit 89ab32c6 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg
Browse files

Branches are fully migrated to Gitaly

parent 143a632e
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Loading
Loading
@@ -157,12 +157,8 @@ module Gitlab
 
# Returns an Array of Branches
def branches
gitaly_migrate(:branches, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled|
if is_enabled
gitaly_ref_client.branches
else
branches_filter
end
wrapped_gitaly_errors do
gitaly_ref_client.branches
end
end
 
Loading
Loading
Loading
Loading
@@ -1344,24 +1344,6 @@ describe Gitlab::Git::Repository, seed_helper: true do
end
end
 
# With Gitaly enabled, Gitaly just doesn't return deleted branches.
context 'with deleted branch with Gitaly disabled' do
before do
allow(Gitlab::GitalyClient).to receive(:feature_enabled?).and_return(false)
end
it 'returns no results' do
ref = double()
allow(ref).to receive(:name) { 'bad-branch' }
allow(ref).to receive(:target) { raise Rugged::ReferenceError }
branches = double()
allow(branches).to receive(:each) { [ref].each }
allow(repository_rugged).to receive(:branches) { branches }
expect(subject).to be_empty
end
end
it_behaves_like 'wrapping gRPC errors', Gitlab::GitalyClient::RefService, :branches
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment