summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-06-22 16:00:02 +0000
committerDouwe Maan <douwe@gitlab.com>2018-06-22 16:00:02 +0000
commit70bc8665637e7d306f2612ab1965eb337cea27ac (patch)
treea1852af13273d9c388912235f814b950d90de745
parent1db2423949b0c5a2722f4b1851a1b80f85dbecdc (diff)
parent417a21a123a3f5e22d5fa1a8442f0aa10a206e55 (diff)
downloadgitlab-ce-70bc8665637e7d306f2612ab1965eb337cea27ac.tar.gz
Merge branch 'zj-commit-raw-diffs' into 'master'
Raw diffs are served from Gitaly Closes gitaly#222 See merge request gitlab-org/gitlab-ce!20091
-rw-r--r--lib/gitlab/git/commit.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/gitlab/git/commit.rb b/lib/gitlab/git/commit.rb
index c9806cdb85f..341768752dc 100644
--- a/lib/gitlab/git/commit.rb
+++ b/lib/gitlab/git/commit.rb
@@ -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]