{"draft":null,"from":180,"to":181,"files":[{"path":"server/test/push.test.ts","added":37,"removed":0,"diff":"--- a/server/test/push.test.ts\n+++ b/server/test/push.test.ts\n@@ -28,6 +28,43 @@\n });\n \n describe(\"commitShared\", () => {\n+\tit(\"batches changed text and preserves pending old files in intermediate commits\", async () => {\n+\t\tconst fs = new MemoryFS(),\n+\t\t\tdir = \"/repo\";\n+\t\tawait git.init({ fs, dir, defaultBranch: \"main\" });\n+\t\tconst first = await commitShared(\n+\t\t\tfs,\n+\t\t\tdir,\n+\t\t\tnull,\n+\t\t\t{ version: 0, files: { \"a.txt\": \"old a\", \"b.txt\": \"old b\", \"gone.txt\": \"delete\" } },\n+\t\t\t() => null,\n+\t\t);\n+\t\tconst parts: string[] = [];\n+\t\tconst body = \"x\".repeat(9 * 1024 * 1024);\n+\t\tconst next = await commitShared(\n+\t\t\tfs,\n+\t\t\tdir,\n+\t\t\tfirst.commit,\n+\t\t\t{ version: 1, files: { \"a.txt\": body, \"b.txt\": body + \"b\" } },\n+\t\t\t() => null,\n+\t\t\tasync (commit) => {\n+\t\t\t\tparts.push(commit);\n+\t\t\t\tassert.equal(\n+\t\t\t\t\tnew TextDecoder().decode((await git.readBlob({ fs, dir, oid: commit, filepath: \"b.txt\" })).blob),\n+\t\t\t\t\t\"old b\",\n+\t\t\t\t);\n+\t\t\t\tassert.equal((await git.readBlob({ fs, dir, oid: commit, filepath: \"a.txt\" })).blob.length, body.length);\n+\t\t\t\tawait assert.rejects(() => git.readBlob({ fs, dir, oid: commit, filepath: \"gone.txt\" }));\n+\t\t\t},\n+\t\t);\n+\t\tassert.equal(parts.length, 1);\n+\t\tassert.deepEqual((await git.readCommit({ fs, dir, oid: next.commit })).commit.parent, parts);\n+\t\tassert.equal(\n+\t\t\tnew TextDecoder().decode((await git.readBlob({ fs, dir, oid: next.commit, filepath: \"b.txt\" })).blob),\n+\t\t\tbody + \"b\",\n+\t\t);\n+\t\tassert.equal(absoVersion((await git.readCommit({ fs, dir, oid: parts[0]! })).commit.message), 1);\n+\t});\n \tit(\"reads one lazy file at a time and does not read symlink placeholder text\", async (t) => {\n \t\tconst fs = new MemoryFS();\n \t\tconst dir = \"/repo\";"}],"unmatched":[]}