From 42cabcb1c45dc8f0d38c36c409bf0efbc9111a67 Mon Sep 17 00:00:00 2001 From: Ahmad Hassan Date: Thu, 17 May 2018 15:34:31 +0300 Subject: Call path_to_repo only when using gitaly --- lib/backup/repository.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb index ba464368042..bc517191939 100644 --- a/lib/backup/repository.rb +++ b/lib/backup/repository.rb @@ -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) -- cgit v1.2.1