summaryrefslogtreecommitdiff
path: root/lib/backup
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2014-10-20 10:52:29 +0200
committerJacob Vosmaer <contact@jacobvosmaer.nl>2014-10-20 10:52:29 +0200
commit8ad1330b6a8648406bcd392ad5884498a25fbceb (patch)
tree40da1fb11b19ec6e0f27d3bbd7c5544bf02564fe /lib/backup
parentc5360a588d4e8a27322dd1eb6cee0e563c32788c (diff)
downloadgitlab-ce-8ad1330b6a8648406bcd392ad5884498a25fbceb.tar.gz
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.
Diffstat (limited to 'lib/backup')
-rw-r--r--lib/backup/repository.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb
index 4e99d4bbe5c..380beac708d 100644
--- a/lib/backup/repository.rb
+++ b/lib/backup/repository.rb
@@ -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))