Commit 76dd0f25 authored by Patrick Steinhardt's avatar Patrick Steinhardt

repository: Remove `#set_config()` implementation

There are no callers anymore which use `#set_config()` to write to the
repository's gitconfig, and the RPC which implements this has been
deprecated with no replacement by Gitaly. We can thus remove this
function as well as its underlying implementation in the
RepositoryService.
parent 955a97c4
......@@ -907,12 +907,6 @@ module Gitlab
gitaly_repository_client.set_full_path(full_path)
end
def set_config(entries)
wrapped_gitaly_errors do
gitaly_repository_client.set_config(entries)
end
end
def disconnect_alternates
wrapped_gitaly_errors do
gitaly_repository_client.disconnect_alternates
......
......@@ -281,25 +281,6 @@ module Gitlab
nil
end
def set_config(entries)
return if entries.empty?
request = Gitaly::SetConfigRequest.new(repository: @gitaly_repo)
entries.each do |key, value|
request.entries << build_set_config_entry(key, value)
end
GitalyClient.call(
@storage,
:repository_service,
:set_config,
request,
timeout: GitalyClient.fast_timeout
)
nil
end
def license_short_name
request = Gitaly::FindLicenseRequest.new(repository: @gitaly_repo)
......
......@@ -1749,29 +1749,6 @@ RSpec.describe Gitlab::Git::Repository, :seed_helper do
end
end
describe '#set_config' do
let(:repository) { mutable_repository }
let(:entries) do
{
'test.foo1' => 'bla bla',
'test.foo2' => 1234,
'test.foo3' => true
}
end
it 'can set config settings' do
expect(repository.set_config(entries)).to be_nil
expect(repository_rugged.config['test.foo1']).to eq('bla bla')
expect(repository_rugged.config['test.foo2']).to eq('1234')
expect(repository_rugged.config['test.foo3']).to eq('true')
end
after do
entries.keys.each { |k| repository_rugged.config.delete(k) }
end
end
describe '#merge_to_ref' do
let(:repository) { mutable_repository }
let(:branch_head) { '6d394385cf567f80a8fd85055db1ab4c5295806f' }
......
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