{"draft":null,"from":242,"to":243,"files":[{"path":"worker/project/version-log.ts","added":12,"removed":5,"diff":"--- a/worker/project/version-log.ts\n+++ b/worker/project/version-log.ts\n@@ -9,7 +9,7 @@\n import { ProjectError } from \"./project-error.ts\";\n import type { FileChange, LogAnswer, LogEntry, ShowAnswer } from \"./project-types.ts\";\n import { last, SHARED, type Space } from \"./spaces.ts\";\n-import { changesBetween } from \"./view-changes.ts\";\n+import { changesBetween, summariesBetween } from \"./view-changes.ts\";\n \n /** What the version list reads need from a project. */\n export interface LogHost {\n@@ -243,8 +243,10 @@\n \thost: LogHost,\n \tfrom: number,\n \tto: number,\n-\toptions: { draft?: string | null; agent?: string } = {},\n-): { from: number; to: number; files: FileChange[] } {\n+\toptions: { draft?: string | null; agent?: string; summary?: boolean } = {},\n+):\n+\t| { from: number; to: number; files: FileChange[] }\n+\t| { from: number; to: number; summary: true; files: ReturnType<typeof summariesBetween> } {\n \thost.needInit();\n \tconst space = host.spaceFor(options);\n \thost.checkVersion(space, from);\n@@ -252,13 +254,18 @@\n \tconst before = host.viewAt(space, from);\n \tconst after = host.viewAt(space, to);\n \tconst files = new Set<string>();\n+\t// With summary, each file's size and SHA-256 instead of its texts (abso issue 680).\n+\tconst answer = (paths: Iterable<string>) =>\n+\t\toptions.summary\n+\t\t\t? { from, to, summary: true as const, files: summariesBetween(before, after, paths) }\n+\t\t\t: { from, to, files: changesBetween(before, after, paths) };\n \t// A stored writer keeps each shared version's changed files (version-files.ts, abso Capacity): every file that\n \t// differs between two versions changed in one between them, so those lists are the candidates, not every atom\n \t// either set holds.\n \tif (space.name === SHARED && host.graph.packedFiles) {\n \t\tfor (let v = Math.min(from, to) + 1; v <= Math.max(from, to); v++)\n \t\t\tfor (const file of host.paths.versionFiles(space, v)) files.add(file);\n-\t\treturn { from, to, files: changesBetween(before, after, files) };\n+\t\treturn answer(files);\n \t}\n \tconst a = host.at(space, from);\n \tconst b = host.at(space, to);\n@@ -274,7 +281,7 @@\n \t\t))\n \t\t\tfiles.add(file);\n \t}\n-\treturn { from, to, files: changesBetween(before, after, files) };\n+\treturn answer(files);\n }\n \n /** A version of shared (or of a named draft) as a ReadView, for reading lines (blame at a version). */"}],"unmatched":[]}