From ae30c4a6398e4c04f3cfdacdcd3f85376a652422 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Tue, 28 Oct 2025 18:40:27 -0700 Subject: [PATCH] Add initial commit to bare repo in TestThreeCloneCollision --- beads_twoclone_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/beads_twoclone_test.go b/beads_twoclone_test.go index d694d4be..d0bb6041 100644 --- a/beads_twoclone_test.go +++ b/beads_twoclone_test.go @@ -499,9 +499,15 @@ func testThreeCloneCollisionWithSyncOrder(t *testing.T, first, second, third str t.Fatalf("bd binary not found at %s - run 'go build -o bd ./cmd/bd' first", bdPath) } - // Create a bare git repo to act as the remote + // Create a bare git repo to act as the remote with initial commit remoteDir := filepath.Join(tmpDir, "remote.git") runCmd(t, tmpDir, "git", "init", "--bare", remoteDir) + + // Create temporary clone to add initial commit + tempClone := filepath.Join(tmpDir, "temp-init") + runCmd(t, tmpDir, "git", "clone", remoteDir, tempClone) + runCmd(t, tempClone, "git", "commit", "--allow-empty", "-m", "Initial commit") + runCmd(t, tempClone, "git", "push", "origin", "master") // Create three clones cloneA := filepath.Join(tmpDir, "clone-a")