summaryrefslogtreecommitdiff
path: root/app/models/repository.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r--app/models/repository.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 063dc74021d..c01895b75e4 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -333,6 +333,8 @@ class Repository
end
def build_cache
+ return if empty?
+
(cache_keys + cache_keys_for_branches_and_tags).each do |key|
unless cache.exist?(key)
send(key)