Skip to content

Commit 48b34f3

Browse files
committed
Enforce default git branch name in tests
1 parent bc595aa commit 48b34f3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ def git_clone(tmp_path):
1717
"""
1818
remote = tmp_path / "remote"
1919
remote.mkdir()
20-
subprocess.check_call(["git", "init", "--bare"], cwd=remote)
20+
subprocess.check_call(
21+
["git", "init", "--bare", "--initial-branch=master"], cwd=remote
22+
)
2123
clone = tmp_path / "clone"
2224
subprocess.check_call(["git", "clone", str(remote), "clone"], cwd=tmp_path)
2325
subprocess.check_call(["git", "config", "user.name", "test"], cwd=clone)

0 commit comments

Comments
 (0)