diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-05-12 10:41:57 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-05-12 10:41:57 +0000 |
commit | 6ecfe0f987fe99426d3ef28d71a542db56e8fbf7 (patch) | |
tree | 48c321f50c8ab69e64fa0fb6521b3dd07b055983 /lib | |
parent | cc9a413dcc57466f18ba756087c1ccd20aae40b0 (diff) | |
parent | 27fb64d6a33ea61ba5a0a3ad50babff8c30fa45f (diff) | |
download | gitlab-ce-6ecfe0f987fe99426d3ef28d71a542db56e8fbf7.tar.gz |
Merge branch 'remove-deltas-only' into 'master'
Remove deltas_only from DiffCollection
Closes gitaly#224
See merge request !11285
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/diff_collection.rb | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/gitlab/git/diff_collection.rb b/lib/gitlab/git/diff_collection.rb index 4e45ec7c174..bcbad8ec829 100644 --- a/lib/gitlab/git/diff_collection.rb +++ b/lib/gitlab/git/diff_collection.rb @@ -15,7 +15,6 @@ module Gitlab @safe_max_bytes = @safe_max_files * 5120 # Average 5 KB per file @all_diffs = !!options.fetch(:all_diffs, false) @no_collapse = !!options.fetch(:no_collapse, true) - @deltas_only = !!options.fetch(:deltas_only, false) @line_count = 0 @byte_count = 0 @@ -27,8 +26,6 @@ module Gitlab if @populated # @iterator.each is slower than just iterating the array in place @array.each(&block) - elsif @deltas_only - each_delta(&block) else Gitlab::GitalyClient.migrate(:commit_raw_diffs) do each_patch(&block) @@ -81,14 +78,6 @@ module Gitlab files >= @safe_max_files || @line_count > @safe_max_lines || @byte_count >= @safe_max_bytes end - def each_delta - @iterator.each_delta.with_index do |delta, i| - diff = Gitlab::Git::Diff.new(delta) - - yield @array[i] = diff - end - end - def each_patch @iterator.each_with_index do |raw, i| # First yield cached Diff instances from @array |