Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed

Versions 180 to 181

Compare

+37 −0 in 1 place
Lines 28–70 at 181 (were 28–33 at 180)
2828});
2929
3030describe("commitShared", () => {
31+ it("batches changed text and preserves pending old files in intermediate commits", async () => {
32+ const fs = new MemoryFS(),
33+ dir = "/repo";
34+ await git.init({ fs, dir, defaultBranch: "main" });
35+ const first = await commitShared(
36+ fs,
37+ dir,
38+ null,
39+ { version: 0, files: { "a.txt": "old a", "b.txt": "old b", "gone.txt": "delete" } },
40+ () => null,
41+ );
42+ const parts: string[] = [];
43+ const body = "x".repeat(9 * 1024 * 1024);
44+ const next = await commitShared(
45+ fs,
46+ dir,
47+ first.commit,
48+ { version: 1, files: { "a.txt": body, "b.txt": body + "b" } },
49+ () => null,
50+ async (commit) => {
51+ parts.push(commit);
52+ assert.equal(
53+ new TextDecoder().decode((await git.readBlob({ fs, dir, oid: commit, filepath: "b.txt" })).blob),
54+ "old b",
55+ );
56+ assert.equal((await git.readBlob({ fs, dir, oid: commit, filepath: "a.txt" })).blob.length, body.length);
57+ await assert.rejects(() => git.readBlob({ fs, dir, oid: commit, filepath: "gone.txt" }));
58+ },
59+ );
60+ assert.equal(parts.length, 1);
61+ assert.deepEqual((await git.readCommit({ fs, dir, oid: next.commit })).commit.parent, parts);
62+ assert.equal(
63+ new TextDecoder().decode((await git.readBlob({ fs, dir, oid: next.commit, filepath: "b.txt" })).blob),
64+ body + "b",
65+ );
66+ assert.equal(absoVersion((await git.readCommit({ fs, dir, oid: parts[0]! })).commit.message), 1);
67+ });
3168 it("reads one lazy file at a time and does not read symlink placeholder text", async (t) => {
3269 const fs = new MemoryFS();
3370 const dir = "/repo";
MCP
compare on this site's /mcp
CLI
abso diff 180 181 server/test/push.test.ts --json
JSON
/christopher/abso-core/compare/180..181?file=server%2Ftest%2Fpush.test.ts&format=json