Skip to content

Commit 3dadb9d

Browse files
ryan-williamsclaude
andcommitted
Fix GC all-branches test on CI (explicit \git init -b main\)
GitHub runners' git defaults to \`master\` for new repos if no init.defaultBranch is configured. Use explicit \`-b main\` to make \`git checkout main\` work across environments. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b20c649 commit 3dadb9d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test_gc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def test_compute_gc_plan_all_branches(tmp_path):
248248
repo = tmp_path / "repo"
249249
repo.mkdir()
250250

251-
subprocess.run(["git", "init"], cwd=repo, capture_output=True, check=True)
251+
subprocess.run(["git", "init", "-b", "main"], cwd=repo, capture_output=True, check=True)
252252
subprocess.run(["git", "config", "user.email", "t@t.com"], cwd=repo, capture_output=True, check=True)
253253
subprocess.run(["git", "config", "user.name", "T"], cwd=repo, capture_output=True, check=True)
254254
(repo / ".dvc").mkdir()

0 commit comments

Comments
 (0)