Commit c28f6053 authored by Thong Kuah's avatar Thong Kuah

Merge branch 'pks-drop-changes-batched-commits' into 'master'

checks: Always enable batched computation of commits

See merge request gitlab-org/gitlab!68747
parents 6a8de81a 295f2e38
---
name: changes_batch_commits
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/66731
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/336992
milestone: '14.2'
type: development
group: group::gitaly
default_enabled: false
......@@ -81,7 +81,7 @@ module Gitlab
def single_access_checks!
# Iterate over all changes to find if user allowed all of them to be applied
changes.each do |change|
commits = Gitlab::Lazy.new { commits_for(change[:newrev]) } if Feature.enabled?(:changes_batch_commits)
commits = Gitlab::Lazy.new { commits_for(change[:newrev]) }
# If user does not have access to make at least one change, cancel all
# push by allowing the exception to bubble up
......
......@@ -8,7 +8,6 @@ RSpec.describe Gitlab::Checks::ChangesAccess do
subject { changes_access }
describe '#validate!' do
shared_examples '#validate!' do
before do
allow(project).to receive(:lfs_enabled?).and_return(true)
end
......@@ -41,23 +40,6 @@ RSpec.describe Gitlab::Checks::ChangesAccess do
end
end
context 'with batched commits enabled' do
before do
stub_feature_flags(changes_batch_commits: true)
end
it_behaves_like '#validate!'
end
context 'with batched commits disabled' do
before do
stub_feature_flags(changes_batch_commits: false)
end
it_behaves_like '#validate!'
end
end
describe '#commits' do
it 'calls #new_commits' do
expect(project.repository).to receive(:new_commits).and_call_original
......
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