Skip to content
Snippets Groups Projects
Commit 9c4f9677 authored by Ahmad Hassan's avatar Ahmad Hassan
Browse files

Take restoring custom hooks and the skip flag out of scope

parent 80197bdc
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -70,8 +70,6 @@ module Backup
# TODO: Need to find a way to do this for gitaly
# Gitaly discussion issue: https://gitlab.com/gitlab-org/gitaly/issues/1194
 
return if Gitlab::GitalyClient.feature_enabled?(:backup_skip_prepare_directories)
Gitlab.config.repositories.storages.each do |name, repository_storage|
path = repository_storage.legacy_disk_path
next unless File.exist?(path)
Loading
Loading
@@ -92,7 +90,7 @@ module Backup
end
end
 
def restore_custom_hooks
def restore_custom_hooks(project)
# TODO: Need to find a way to do this for gitaly
# Gitaly migration issue: https://gitlab.com/gitlab-org/gitaly/issues/1195
in_path(path_to_tars(project)) do |dir|
Loading
Loading
@@ -134,7 +132,7 @@ module Backup
progress.puts "[Failed] restoring #{project.full_path} repository".color(:red)
end
 
restore_custom_hooks unless Gitlab::GitalyClient.feature_enabled?(:backup_skip_restore_custom_hooks)
restore_custom_hooks(project)
 
wiki = ProjectWiki.new(project)
path_to_wiki_bundle = path_to_bundle(wiki)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment