Skip to content

Commit f8f64c2

Browse files
fix: Initialize git repo with main branch in tests
The git init command was creating a 'master' branch by default, causing tests that check for 'main' branch to fail in CI.
1 parent f222c59 commit f8f64c2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/git/worktree_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func createTestRepo(t *testing.T) (string, string) {
1616
t.Fatalf("creating repo dir: %v", err)
1717
}
1818

19-
cmd := exec.Command("git", "init")
19+
cmd := exec.Command("git", "init", "-b", "main")
2020
cmd.Dir = repoDir
2121
if err := cmd.Run(); err != nil {
2222
t.Fatalf("initializing git repo: %v", err)

0 commit comments

Comments
 (0)