Skip to content

Commit

Permalink
Enforce default git branch name in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Jun 17, 2023
1 parent bc595aa commit 48b34f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ def git_clone(tmp_path):
"""
remote = tmp_path / "remote"
remote.mkdir()
subprocess.check_call(["git", "init", "--bare"], cwd=remote)
subprocess.check_call(
["git", "init", "--bare", "--initial-branch=master"], cwd=remote
)
clone = tmp_path / "clone"
subprocess.check_call(["git", "clone", str(remote), "clone"], cwd=tmp_path)
subprocess.check_call(["git", "config", "user.name", "test"], cwd=clone)
Expand Down

0 comments on commit 48b34f3

Please sign in to comment.