summaryrefslogtreecommitdiff
path: root/lib/gitlab/git/commit.rb
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2018-07-06 14:44:54 +0200
committerJacob Vosmaer <jacob@gitlab.com>2018-07-06 14:44:54 +0200
commitc770d2f96e222ecb7a11b04e8b9dd3b0ebf6b794 (patch)
tree8032f49c97863f71f1bfe2cae99f39d6ba7e4ae8 /lib/gitlab/git/commit.rb
parentb62825fd8e9c2215a270675a1209442fd1d38b30 (diff)
downloadgitlab-ce-c770d2f96e222ecb7a11b04e8b9dd3b0ebf6b794.tar.gz
Make more things mandatory
Diffstat (limited to 'lib/gitlab/git/commit.rb')
-rw-r--r--lib/gitlab/git/commit.rb18
1 files changed, 3 insertions, 15 deletions
diff --git a/lib/gitlab/git/commit.rb b/lib/gitlab/git/commit.rb
index 36d56e411d8..4e2d817d12c 100644
--- a/lib/gitlab/git/commit.rb
+++ b/lib/gitlab/git/commit.rb
@@ -164,13 +164,8 @@ module Gitlab
# relation to each other. The last 10 commits for a branch for example,
# should go through .where
def batch_by_oid(repo, oids)
- repo.gitaly_migrate(:list_commits_by_oid,
- status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled|
- if is_enabled
- repo.gitaly_commit_client.list_commits_by_oid(oids)
- else
- oids.map { |oid| find(repo, oid) }.compact
- end
+ repo.wrapped_gitaly_errors do
+ repo.gitaly_commit_client.list_commits_by_oid(oids)
end
end
@@ -289,14 +284,7 @@ module Gitlab
def deltas
@deltas ||= begin
- deltas = Gitlab::GitalyClient.migrate(:commit_deltas) do |is_enabled|
- if is_enabled
- @repository.gitaly_commit_client.commit_deltas(self)
- else
- rugged_diff_from_parent.each_delta
- end
- end
-
+ deltas = @repository.gitaly_commit_client.commit_deltas(self)
deltas.map { |delta| Gitlab::Git::Diff.new(delta) }
end
end