summaryrefslogtreecommitdiff
path: root/lib/gitlab/git/commit_stats.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/git/commit_stats.rb')
-rw-r--r--lib/gitlab/git/commit_stats.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/gitlab/git/commit_stats.rb b/lib/gitlab/git/commit_stats.rb
index 6bf49a0af18..8463b1eb794 100644
--- a/lib/gitlab/git/commit_stats.rb
+++ b/lib/gitlab/git/commit_stats.rb
@@ -34,13 +34,8 @@ module Gitlab
def rugged_stats(commit)
diff = commit.rugged_diff_from_parent
-
- diff.each_patch do |p|
- # TODO: Use the new Rugged convenience methods when they're released
- @additions += p.stat[0]
- @deletions += p.stat[1]
- @total += p.changes
- end
+ _files_changed, @additions, @deletions = diff.stat
+ @total = @additions + @deletions
end
end
end