fix(tests): ensures init.defaultBranch does not break the tests

This commit is contained in:
Axel H 2021-10-22 16:02:34 +02:00
parent ae53a8eb65
commit c0d0922d8c
No known key found for this signature in database
GPG key ID: 01CFF828B72703A1
2 changed files with 2 additions and 2 deletions

View file

@ -36,7 +36,7 @@ def copy_tree_to_path(src_dir, dest_dir):
def git_dir(tempdir_factory): def git_dir(tempdir_factory):
path = tempdir_factory.get() path = tempdir_factory.get()
cmd_output('git', 'init', path) cmd_output('git', 'init', '-b', 'master', path)
return path return path

View file

@ -63,7 +63,7 @@ def in_tmpdir(tempdir_factory):
def in_git_dir(tmpdir): def in_git_dir(tmpdir):
repo = tmpdir.join('repo').ensure_dir() repo = tmpdir.join('repo').ensure_dir()
with repo.as_cwd(): with repo.as_cwd():
cmd_output('git', 'init') cmd_output('git', 'init', '-b', 'master')
yield repo yield repo