Commit 44e6b802 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'empty_wiki_backup_check' into 'master'

Empty wiki backup check

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.

See merge request !1195
parents c0a5d043 8ad1330b
No related merge requests found
...@@ -30,7 +30,7 @@ module Backup ...@@ -30,7 +30,7 @@ module Backup
if File.exists?(path_to_repo(wiki)) if File.exists?(path_to_repo(wiki))
print " * #{wiki.path_with_namespace} ... " print " * #{wiki.path_with_namespace} ... "
if wiki.empty? if wiki.repository.empty?
puts " [SKIPPED]".cyan puts " [SKIPPED]".cyan
else else
output, status = Gitlab::Popen.popen(%W(git --git-dir=#{path_to_repo(wiki)} bundle create #{path_to_bundle(wiki)} --all)) output, status = Gitlab::Popen.popen(%W(git --git-dir=#{path_to_repo(wiki)} bundle create #{path_to_bundle(wiki)} --all))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment