Ask the wiki repo, not Gollum, if it's empty

We need to skip empty repositories when creating a backup. Before this
change, we were asking gollum-lib if the wiki contains any _pages_. Now
we ask gitlab_git if the repository contains _files_. This should
resolve gollum_lib Grit timeouts in the backup script.
This commit is contained in:
Jacob Vosmaer 2014-10-20 10:52:29 +02:00
parent c5360a588d
commit 8ad1330b6a
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ module Backup
if File.exists?(path_to_repo(wiki))
print " * #{wiki.path_with_namespace} ... "
if wiki.empty?
if wiki.repository.empty?
puts " [SKIPPED]".cyan
else
output, status = Gitlab::Popen.popen(%W(git --git-dir=#{path_to_repo(wiki)} bundle create #{path_to_bundle(wiki)} --all))