Skip to content
Snippets Groups Projects
Commit 0f1d8e77 authored by Robert Speicher's avatar Robert Speicher
Browse files

Define GIT_TEMPLATE_DIR environment variable in TestEnv

See http://schacon.github.io/git/git-init.html#_template_directory

Without this variable, any global git hooks a developer might have in
~/.git_template would be linked in the `.git/hooks` folder for every
test repository that gets checked out by TestEnv, and would cause
certain specs to fail due to pre-existing hook files.
parent 3d4c2d0b
No related branches found
No related tags found
2 merge requests!9044Define GIT_TEMPLATE_DIR environment variable in TestEnv,!8686add "Uplaod" and "Replace" functionality
Loading
Loading
@@ -85,7 +85,7 @@ module TestEnv
end
 
# We must copy bare repositories because we will push to them.
system(*%W(git clone -q --bare #{factory_repo_path} #{factory_repo_path_bare}))
system(git_env, *%W(git clone -q --bare #{factory_repo_path} #{factory_repo_path_bare}))
end
 
def copy_repo(project)
Loading
Loading
@@ -113,4 +113,10 @@ module TestEnv
def factory_repo_name
'gitlab-test'
end
# Prevent developer git configurations from being persisted to test
# repositories
def git_env
{'GIT_TEMPLATE_DIR' => ''}
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment