Skip to content

Commit 8f432a3

Browse files
committed
fix default branch name on older git
1 parent bc0e631 commit 8f432a3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/git_year_with_merge/setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def setup():
3333
# Init git repo
3434
print("Initializing git repo...")
3535
run_cmd(["git", "init"], cwd=test_dir)
36+
# Older git versions default to `master` so we explicitly name it `main`
37+
run_cmd(["git", "branch", "-m", "main"], cwd=test_dir)
3638
# Configure user for reproducibility
3739
run_cmd(["git", "config", "user.email", "you@example.com"], cwd=test_dir)
3840
run_cmd(["git", "config", "user.name", "Your Name"], cwd=test_dir)

0 commit comments

Comments
 (0)