Commit 5ddc9ad0 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

Remove feature gate for ListNewCommits

Introduced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20087,
this has been tested on .com now, and is stable.

Closes https://gitlab.com/gitlab-org/gitaly/issues/1286
Closes https://gitlab.com/gitlab-org/gitaly/issues/1233
parent 00c474ae
...@@ -366,18 +366,9 @@ module Gitlab ...@@ -366,18 +366,9 @@ module Gitlab
end end
end end
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/1233
def new_commits(newrev) def new_commits(newrev)
gitaly_migrate(:new_commits) do |is_enabled| wrapped_gitaly_errors do
if is_enabled
gitaly_ref_client.list_new_commits(newrev) gitaly_ref_client.list_new_commits(newrev)
else
refs = Gitlab::GitalyClient::StorageSettings.allow_disk_access do
rev_list(including: newrev, excluding: :all).split("\n").map(&:strip)
end
Gitlab::Git::Commit.batch_by_oid(self, refs)
end
end end
end end
......
...@@ -296,7 +296,6 @@ describe Repository do ...@@ -296,7 +296,6 @@ describe Repository do
end end
describe '#new_commits' do describe '#new_commits' do
shared_examples 'finding unreferenced commits' do
set(:project) { create(:project, :repository) } set(:project) { create(:project, :repository) }
let(:repository) { project.repository } let(:repository) { project.repository }
...@@ -324,15 +323,6 @@ describe Repository do ...@@ -324,15 +323,6 @@ describe Repository do
end end
end end
context 'when Gitaly handles the request' do
it_behaves_like 'finding unreferenced commits'
end
context 'when Gitaly is disabled', :disable_gitaly do
it_behaves_like 'finding unreferenced commits'
end
end
describe '#commits_by' do describe '#commits_by' do
set(:project) { create(:project, :repository) } set(:project) { create(:project, :repository) }
......
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