Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-12-17 11:26:09 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-12-17 11:26:09 +0300
commit50ce459118034893b793dd9a601df5d20831b943 (patch)
tree92e7e3396cc250b6e9aac7db4bd576fe35509469
parent8b4602041cf2c4a8738a4796d78720017249249f (diff)
Upgrade Gitaly to 1.9.0
This upgrade moves logic from gitlab-rails to Gitaly, which allowed code removal too.
-rw-r--r--GITALY_SERVER_VERSION2
-rw-r--r--lib/gitlab/git/object_pool.rb7
-rw-r--r--spec/lib/gitlab/git/object_pool_spec.rb24
3 files changed, 8 insertions, 25 deletions
diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION
index bd8bf882d06..f8e233b2733 100644
--- a/GITALY_SERVER_VERSION
+++ b/GITALY_SERVER_VERSION
@@ -1 +1 @@
-1.7.0
+1.9.0
diff --git a/lib/gitlab/git/object_pool.rb b/lib/gitlab/git/object_pool.rb
index 558699a6318..ba9b40b7df4 100644
--- a/lib/gitlab/git/object_pool.rb
+++ b/lib/gitlab/git/object_pool.rb
@@ -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
diff --git a/spec/lib/gitlab/git/object_pool_spec.rb b/spec/lib/gitlab/git/object_pool_spec.rb
index 363c2aa67af..0d5069568e1 100644
--- a/spec/lib/gitlab/git/object_pool_spec.rb
+++ b/spec/lib/gitlab/git/object_pool_spec.rb
@@ -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