Skip to content

Commit e3ae763

Browse files
chrislloydclaude
andcommitted
Fix CI failure by ensuring e2e tests use main branch consistently
The macOS CI was failing because git init creates 'master' branch by default but the test script was trying to push to 'main'. Added explicit branch renaming to ensure consistent behavior across different git configurations. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent cec9339 commit e3ae763

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/e2e.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ test_push() {
8080
git config user.name "Test User"
8181
git config user.email "test@example.com"
8282
git config commit.gpgsign false
83+
git config init.defaultBranch main
8384

8485
# Create a test file
8586
echo "# Test Repository" > README.md
@@ -88,6 +89,9 @@ test_push() {
8889
# Commit the file
8990
git add README.md
9091
git commit -m "Initial commit"
92+
93+
# Ensure we're on main branch (rename master to main if needed)
94+
git branch -M main
9195

9296
# Add the database as a remote and push
9397
git remote add origin "sqlite://${TEST_DIR}/test.db"
@@ -114,6 +118,7 @@ test_clone() {
114118
git config user.name "Test User"
115119
git config user.email "test@example.com"
116120
git config commit.gpgsign false
121+
git config init.defaultBranch main
117122

118123
# Add the database as a remote and fetch
119124
git remote add origin "sqlite://${TEST_DIR}/test.db"

0 commit comments

Comments
 (0)