From 53b91ff0cd595ae4fae507cffb0df5991169e3c8 Mon Sep 17 00:00:00 2001 From: William Stein Date: Tue, 20 Oct 2026 21:38:38 +0000 Subject: [PATCH] preview-commit test: an 8-head merge makes 3 diffs since #27 (P1), not 9 #25 and #27 merged without a rebase: #27 caps a merge's candidate diffs at 2, so the preview test's count is 1 + 2. The no-rebuild assertion stays: preview plus commit makes exactly the diffs of a plain commit. --- src/preview-commit.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/preview-commit.test.ts b/src/preview-commit.test.ts index 107f2bf..4c2c082 100644 --- a/src/preview-commit.test.ts +++ b/src/preview-commit.test.ts @@ -385,8 +385,9 @@ describe("previewCommit", () => { let envelope: PatchEnvelope; if (previewed) { const preview = a.previewCommit(next); - // One patch and 8 candidate merge diffs, all in the preview. - expect(counts.diffs).toBe(9); + // One patch and 2 candidate merge diffs (MAX_MERGE_PARENT_CANDIDATES), + // all in the preview. + expect(counts.diffs).toBe(3); const diffs = counts.diffs; envelope = a.commit(next, { preview }); expect(counts.diffs).toBe(diffs);