From 48254d187f421dfeb85a84bf2b86399add6e6a67 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Tue, 9 May 2017 12:27:17 +0200 Subject: Don't use DiffCollection for deltas --- lib/gitlab/git/commit.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') 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 -- cgit v1.2.1