summaryrefslogtreecommitdiff
path: root/lib/backup
diff options
context:
space:
mode:
authorAhmad Hassan <ahmad.hassan612@gmail.com>2018-05-17 15:34:31 +0300
committerAhmad Hassan <ahmad.hassan612@gmail.com>2018-05-17 15:34:31 +0300
commit42cabcb1c45dc8f0d38c36c409bf0efbc9111a67 (patch)
treee2e7214bd1a800d64aa8515dd938a22f6d16f56e /lib/backup
parent51ee6f0b8ba1995f60299f7f399bed1420de5729 (diff)
downloadgitlab-ce-42cabcb1c45dc8f0d38c36c409bf0efbc9111a67.tar.gz
Call path_to_repo only when using gitaly
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 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)