Lines 9–15 at 243 (were 9–15 at 242)
99import { ProjectError } from "./project-error.ts"; 1010import type { FileChange, LogAnswer, LogEntry, ShowAnswer } from "./project-types.ts"; 1111import { last, SHARED, type Space } from "./spaces.ts"; 12−import { changesBetween } from "./view-changes.ts";
12+import { changesBetween, summariesBetween } from "./view-changes.ts"; 1414/** What the version list reads need from a project. */ 1515export interface LogHost { Lines 243–252 at 243 (were 243–250 at 242)
246− options: { draft?: string | null; agent?: string } = {},
247−): { from: number; to: number; files: FileChange[] } {
246+ options: { draft?: string | null; agent?: string; summary?: boolean } = {}, 248+ | { from: number; to: number; files: FileChange[] } 249+ | { from: number; to: number; summary: true; files: ReturnType<typeof summariesBetween> } { 249251 const space = host.spaceFor(options); 250252 host.checkVersion(space, from); Lines 254–271 at 243 (were 252–264 at 242)
252254 const before = host.viewAt(space, from); 253255 const after = host.viewAt(space, to); 254256 const files = new Set<string>(); 257+ // With summary, each file's size and SHA-256 instead of its texts (abso issue 680). 258+ const answer = (paths: Iterable<string>) => 260+ ? { from, to, summary: true as const, files: summariesBetween(before, after, paths) } 261+ : { from, to, files: changesBetween(before, after, paths) }; 255262 // A stored writer keeps each shared version's changed files (version-files.ts, abso Capacity): every file that 256263 // differs between two versions changed in one between them, so those lists are the candidates, not every atom 257264 // either set holds. 258265 if (space.name === SHARED && host.graph.packedFiles) { 259266 for (let v = Math.min(from, to) + 1; v <= Math.max(from, to); v++) 260267 for (const file of host.paths.versionFiles(space, v)) files.add(file); 261− return { from, to, files: changesBetween(before, after, files) };
268+ return answer(files); 263270 const a = host.at(space, from); 264271 const b = host.at(space, to); Lines 281–287 at 243 (were 274–280 at 242)
277− return { from, to, files: changesBetween(before, after, files) };
284+ return answer(files); 280287/** A version of shared (or of a named draft) as a ReadView, for reading lines (blame at a version). */