diff options
author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2017-12-07 15:33:30 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-12-07 15:33:30 +0000 |
commit | 03ac8d5d0b8331a2ecfae05137e02c78428fa899 (patch) | |
tree | 94e21e1591b30996e80f41d6f2fd14b5a80d8c3e /lib/backup | |
parent | b756b0af2bd2d370843d6b936089bd9d4be60b79 (diff) | |
download | gitlab-ce-03ac8d5d0b8331a2ecfae05137e02c78428fa899.tar.gz |
Remove Rugged::Repository#empty?
Diffstat (limited to 'lib/backup')
-rw-r--r-- | lib/backup/repository.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb index b6d273b98c2..2a04c03919d 100644 --- a/lib/backup/repository.rb +++ b/lib/backup/repository.rb @@ -193,12 +193,9 @@ module Backup end def empty_repo?(project_or_wiki) - project_or_wiki.repository.expire_exists_cache # protect backups from stale cache - project_or_wiki.repository.empty_repo? - rescue => e - progress.puts "Ignoring repository error and continuing backing up project: #{display_repo_path(project_or_wiki)} - #{e.message}".color(:orange) - - false + # Protect against stale caches + project_or_wiki.repository.expire_emptiness_caches + project_or_wiki.repository.empty? end def repository_storage_paths_args |