Raw diffs are served from Gitaly

Closes https://gitlab.com/gitlab-org/gitaly/issues/222
This commit is contained in:
Zeger-Jan van de Weg 2018-06-22 11:49:46 +02:00
parent 348ad22d7a
commit 417a21a123
No known key found for this signature in database
GPG Key ID: 65F6A8D64A88ABAC
1 changed files with 3 additions and 7 deletions

View File

@ -381,15 +381,11 @@ module Gitlab
# empty repo. See Repository#diff for keys allowed in the +options+
# hash.
def diff_from_parent(options = {})
Gitlab::GitalyClient.migrate(:commit_raw_diffs) do |is_enabled|
if is_enabled
@repository.gitaly_commit_client.diff_from_parent(self, options)
else
rugged_diff_from_parent(options)
end
end
@repository.gitaly_commit_client.diff_from_parent(self, options)
end
# Not to be called directly, but right now its used for tests and in old
# migrations
def rugged_diff_from_parent(options = {})
options ||= {}
break_rewrites = options[:break_rewrites]