Commit 42cabcb1 authored by Ahmad Hassan's avatar Ahmad Hassan

Call path_to_repo only when using gitaly

parent 51ee6f0b
......@@ -99,7 +99,6 @@ module Backup
Project.find_each(batch_size: 1000) do |project|
progress.print " * #{project.full_path} ... "
path_to_project_bundle = path_to_bundle(project)
path_to_project_repo = path_to_repo(project)
project.ensure_storage_path_exists
restore_repo_success = nil
......@@ -127,6 +126,7 @@ module Backup
# Gitaly migration issue: https://gitlab.com/gitlab-org/gitaly/issues/1195
unless is_enabled
in_path(path_to_tars(project)) do |dir|
path_to_project_repo = path_to_repo(project)
cmd = %W(tar -xf #{path_to_tars(project, dir)} -C #{path_to_project_repo} #{dir})
output, status = Gitlab::Popen.popen(cmd)
......
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