Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-05-09 18:38:38 +0300
committerSean McGivern <sean@mcgivern.me.uk>2017-05-09 18:38:38 +0300
commitc1174901c67f76a10f5a07ce3990af00ca1e0b05 (patch)
tree165476525fdb91309c2634505493766a836adffe /lib
parent5354c29352416a606f16c58e65bfbafebfa1ef3c (diff)
parent3107f2e460d8db35f7ddd0cc5f68575233bfc133 (diff)
Merge branch 'deltas-only' into 'master'
Don't use DiffCollection for deltas See merge request !11201
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git/commit.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/git/commit.rb b/lib/gitlab/git/commit.rb
index 3a73697dc5d..f9a9b767ef4 100644
--- a/lib/gitlab/git/commit.rb
+++ b/lib/gitlab/git/commit.rb
@@ -192,6 +192,10 @@ module Gitlab
Commit.diff_from_parent(raw_commit, options)
end
+ def deltas
+ @deltas ||= diff_from_parent.each_delta.map { |d| Gitlab::Git::Diff.new(d) }
+ end
+
def has_zero_stats?
stats.total.zero?
rescue