diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-05-09 18:38:38 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-05-09 18:38:38 +0300 |
commit | c1174901c67f76a10f5a07ce3990af00ca1e0b05 (patch) | |
tree | 165476525fdb91309c2634505493766a836adffe /lib/gitlab/git | |
parent | 5354c29352416a606f16c58e65bfbafebfa1ef3c (diff) | |
parent | 3107f2e460d8db35f7ddd0cc5f68575233bfc133 (diff) |
Merge branch 'deltas-only' into 'master'
Don't use DiffCollection for deltas
See merge request !11201
Diffstat (limited to 'lib/gitlab/git')
-rw-r--r-- | lib/gitlab/git/commit.rb | 4 |
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 |