Commit fbf9cac6 authored by James Fargher's avatar James Fargher

Merge branch 'pks-gitaly-remove-list-new-blobs' into 'master'

gitaly_client: Remove unused `#list_new_blobs` function

See merge request gitlab-org/gitlab!70363
parents 6de9946c 0bc19a62
...@@ -62,28 +62,6 @@ module Gitlab ...@@ -62,28 +62,6 @@ module Gitlab
consume_refs_response(response) { |name| Gitlab::Git.tag_name(name) } consume_refs_response(response) { |name| Gitlab::Git.tag_name(name) }
end end
def list_new_blobs(newrev, limit = 0, dynamic_timeout: nil)
request = Gitaly::ListNewBlobsRequest.new(
repository: @gitaly_repo,
commit_id: newrev,
limit: limit
)
timeout =
if dynamic_timeout
[dynamic_timeout, GitalyClient.medium_timeout].min
else
GitalyClient.medium_timeout
end
response = GitalyClient.call(@storage, :ref_service, :list_new_blobs, request, timeout: timeout)
response.flat_map do |msg|
# Returns an Array of Gitaly::NewBlobObject objects
# Available methods are: #size, #oid and #path
msg.new_blob_objects
end
end
def count_tag_names def count_tag_names
tag_names.count tag_names.count
end end
......
...@@ -133,16 +133,6 @@ RSpec.describe Gitlab::GitalyClient::RefService do ...@@ -133,16 +133,6 @@ RSpec.describe Gitlab::GitalyClient::RefService do
end end
end end
describe '#list_new_blobs' do
it 'raises DeadlineExceeded when timeout is too small' do
newrev = '54fcc214b94e78d7a41a9a8fe6d87a5e59500e51'
expect do
client.list_new_blobs(newrev, dynamic_timeout: 0.001)
end.to raise_error(GRPC::DeadlineExceeded)
end
end
describe '#local_branches' do describe '#local_branches' do
it 'sends a find_local_branches message' do it 'sends a find_local_branches message' do
expect_any_instance_of(Gitaly::RefService::Stub) expect_any_instance_of(Gitaly::RefService::Stub)
......
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