mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-16 02:21:46 +04:00
fix(tests): ensures init.defaultBranch does not break the tests
This commit is contained in:
parent
ae53a8eb65
commit
c0d0922d8c
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue