Commit 50ce4591 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

Upgrade Gitaly to 1.9.0

This upgrade moves logic from gitlab-rails to Gitaly, which allowed code
removal too.
parent 8b460204
......@@ -23,13 +23,6 @@ module Gitlab
end
def link(to_link_repo)
remote_name = to_link_repo.object_pool_remote_name
repository.set_config(
"remote.#{remote_name}.url" => relative_path_to(to_link_repo.relative_path),
"remote.#{remote_name}.tagOpt" => "--no-tags",
"remote.#{remote_name}.fetch" => "+refs/*:refs/remotes/#{remote_name}/*"
)
object_pool_service.link_repository(to_link_repo)
end
......
......@@ -56,16 +56,11 @@ describe Gitlab::Git::ObjectPool do
describe '#link' do
let!(:pool_repository) { create(:pool_repository, :ready) }
context 'when no remotes are set' do
context 'when linked for the first time' do
it 'sets a remote' do
subject.link(source_repository)
repo = Gitlab::GitalyClient::StorageSettings.allow_disk_access do
Rugged::Repository.new(subject.repository.path)
end
expect(repo.remotes.count).to be(1)
expect(repo.remotes.first.name).to eq(source_repository.object_pool_remote_name)
expect do
subject.link(source_repository)
end.not_to raise_error
end
end
......@@ -75,14 +70,9 @@ describe Gitlab::Git::ObjectPool do
end
it "doesn't raise an error" do
subject.link(source_repository)
repo = Gitlab::GitalyClient::StorageSettings.allow_disk_access do
Rugged::Repository.new(subject.repository.path)
end
expect(repo.remotes.count).to be(1)
expect(repo.remotes.first.name).to eq(source_repository.object_pool_remote_name)
expect do
subject.link(source_repository)
end.not_to raise_error
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment