summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorAhmad Sherif <me@ahmadsherif.com>2016-07-29 19:31:37 +0200
committerAhmad Sherif <me@ahmadsherif.com>2016-08-03 19:23:44 +0200
commita16c26c957ae893f6957fd0ad66c189d0b8ca079 (patch)
treee4c7b4f20613947cdfb3499a61633e0b3819b6b5 /app/models/commit.rb
parentf4282412be181701ee43369dd092a69c3b3b9e65 (diff)
downloadgitlab-ce-a16c26c957ae893f6957fd0ad66c189d0b8ca079.tar.gz
Speed up Commit#repo_changes
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index d58c2fb8106..cc413448ce8 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -334,7 +334,7 @@ class Commit
def repo_changes
changes = { added: [], modified: [], removed: [] }
- raw_diffs.each do |diff|
+ raw_diffs(deltas_only: true).each do |diff|
if diff.deleted_file
changes[:removed] << diff.old_path
elsif diff.renamed_file || diff.new_file