Configure user for mock Git repository (#6128)

If user.useConfigOnly is set globally and no name or e-mail is
configured, the git_fetch tests fail.
This commit is contained in:
Michael Kuhn 2017-11-03 05:43:28 +01:00 committed by Todd Gamblin
parent 0f896e921f
commit bd7d61325f

View file

@ -463,6 +463,8 @@ def mock_git_repository(tmpdir_factory):
# Initialize the repository # Initialize the repository
with repodir.as_cwd(): with repodir.as_cwd():
git('init') git('init')
git('config', 'user.name', 'Spack')
git('config', 'user.email', 'spack@spack.io')
url = 'file://' + str(repodir) url = 'file://' + str(repodir)
# r0 is just the first commit # r0 is just the first commit