summaryrefslogtreecommitdiff
path: root/app/models/repository.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-07-29 13:46:39 -0700
committerAhmad Sherif <me@ahmadsherif.com>2016-08-03 19:24:28 +0200
commit6eba7188f1cd1fc0bfcb8b1cf46f40338dc892b5 (patch)
tree622da4b3fd2e6fcac4ef32494ea4f8d10e05cc65 /app/models/repository.rb
parenta16c26c957ae893f6957fd0ad66c189d0b8ca079 (diff)
downloadgitlab-ce-6eba7188f1cd1fc0bfcb8b1cf46f40338dc892b5.tar.gz
Use only deltas in diffs when scanning the last commit for changes in the avatar to save memory
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r--app/models/repository.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 3d95344a68f..c1170c470ea 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -372,7 +372,7 @@ class Repository
# We don't want to flush the cache if the commit didn't actually make any
# changes to any of the possible avatar files.
if revision && commit = self.commit(revision)
- return unless commit.raw_diffs.
+ return unless commit.raw_diffs(deltas_only: true).
any? { |diff| AVATAR_FILES.include?(diff.new_path) }
end