Commit 2a318274 authored by Nick Thomas's avatar Nick Thomas

Use the ListCommits RPC, not CommitsBetween, when processing git push

The latter is obsoleted by the former, and is more amenable to commit
limiting, which will come in a later commit.

Changelog: performance
parent bdf91edb
---
name: between_uses_list_commits
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67591
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/337960
milestone: '14.2'
type: development
group: group::source code
default_enabled: false
......@@ -116,13 +116,9 @@ module Gitlab
return [] if Gitlab::Git.blank_ref?(base) || Gitlab::Git.blank_ref?(head)
wrapped_gitaly_errors do
if Feature.enabled?(:between_uses_list_commits, default_enabled: :yaml)
revisions = [head, "^#{base}"] # base..head
repo.gitaly_commit_client.list_commits(revisions, reverse: true)
else
repo.gitaly_commit_client.between(base, head)
end
end
end
......
......@@ -370,14 +370,6 @@ RSpec.describe Gitlab::Git::Commit, :seed_helper do
end
it { is_expected.to contain_exactly(SeedRepo::Commit::ID) }
context 'between_uses_list_commits FF disabled' do
before do
stub_feature_flags(between_uses_list_commits: false)
end
it { is_expected.to contain_exactly(SeedRepo::Commit::ID) }
end
end
describe '.shas_with_signatures' do
......
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