Commit bf64582f authored by Bob Van Landuyt's avatar Bob Van Landuyt

Fix warning when cloning repo that already exists

fixes the warning:

fatal: destination path '~/gitlab-ce/gitlab/tmp/tests/gitlab-test-fork_bare' already exists and is not an empty directory.
parent 9fc17f6f
...@@ -131,9 +131,11 @@ module TestEnv ...@@ -131,9 +131,11 @@ module TestEnv
set_repo_refs(repo_path, branch_sha) set_repo_refs(repo_path, branch_sha)
unless File.directory?(repo_path_bare)
# We must copy bare repositories because we will push to them. # We must copy bare repositories because we will push to them.
system(git_env, *%W(#{Gitlab.config.git.bin_path} clone -q --bare #{repo_path} #{repo_path_bare})) system(git_env, *%W(#{Gitlab.config.git.bin_path} clone -q --bare #{repo_path} #{repo_path_bare}))
end end
end
def copy_repo(project) def copy_repo(project)
base_repo_path = File.expand_path(factory_repo_path_bare) base_repo_path = File.expand_path(factory_repo_path_bare)
......
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