diff options
author | Robert Speicher <robert@gitlab.com> | 2017-04-03 13:57:06 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-04-03 13:57:06 +0000 |
commit | feb3f3065c3721083d5aa9c07c4dbbfbe0492eee (patch) | |
tree | 07bcba4f679c95a4dd2cbf942df0f6010817101d | |
parent | 2faf955c241ce7e99111f8fd0cae2e7ab6167e5a (diff) | |
parent | bf64582f671ae057c853ff97876348574fe14a53 (diff) | |
download | gitlab-ce-feb3f3065c3721083d5aa9c07c4dbbfbe0492eee.tar.gz |
Merge branch 'bvl-cleanup-repos' into 'master'
Fix warning when trying to clone repo that already existed
See merge request !10367
-rw-r--r-- | spec/support/test_env.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb index a19a35c2c0d..1b5cb71a6b0 100644 --- a/spec/support/test_env.rb +++ b/spec/support/test_env.rb @@ -131,8 +131,10 @@ module TestEnv set_repo_refs(repo_path, branch_sha) - # 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})) + unless File.directory?(repo_path_bare) + # 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})) + end end def copy_repo(project) |