fix(diff): preserve revision ordering and readable files

This commit is contained in:
Mohamed Boudra
2026-11-06 06:50:25 +01:00
parent 870180cbe5
commit 8e1e377120
21 changed files with 467 additions and 282 deletions
@@ -86,3 +86,10 @@ it("shows the announced tree while file bodies are still loading", () => {
expect(result.entries).toEqual(entries);
expect(result.files).toEqual([]);
});
it("settles a comparison without a base and leaves Uncommitted available", async () => {
const { checkoutDiffComparisonError } = await import("./diff-snapshot");
expect(checkoutDiffComparisonError({ mode: "all" })).toMatchObject({ code: "INVALID_COMPARE" });
expect(checkoutDiffComparisonError({ mode: "base" })).toMatchObject({ code: "INVALID_COMPARE" });
expect(checkoutDiffComparisonError({ mode: "uncommitted" })).toBeNull();
});