{"draft":null,"from":185,"to":186,"files":[{"path":"client/src/changes.ts","added":46,"removed":0,"diff":"--- a/client/src/changes.ts\n+++ b/client/src/changes.ts\n@@ -28,6 +28,7 @@\n import { byWhom } from \"./history-answers.ts\";\n import { applyMode, PLAIN, readKnownModes, writeKnownModes } from \"./modes.ts\";\n import { refusedText, screenAnswer } from \"./safety.ts\";\n+import { refusalText, withoutArg, withoutHeading } from \"./without.ts\";\n \n /** The space to read: --draft (where \"shared\" means shared), else the one this agent is in (shared, in a folder with no agent). */\n function space(args: Parsed, agent: string): Where {\n@@ -425,6 +426,49 @@\n \treturn { text: lines.join(\"\\n\"), json: { ...answer } };\n }\n \n+/** abso show <version>[:<file>] --without <versions>: what differs with them left out, or that file then. */\n+async function showWithout(\n+\tapi: Api,\n+\troot: string,\n+\tcwd: string,\n+\tword: string,\n+\twhere: Where,\n+\tleave: readonly number[],\n+): Promise<Output> {\n+\tif (\"draft\" in where && where.draft !== null) throw new UsageError(\"--without reads shared, not a named draft\");\n+\tconst colon = word.indexOf(\":\");\n+\tconst v = version(colon >= 0 ? word.slice(0, colon) : word);\n+\tconst path = colon >= 0 ? fileArg(root, cwd, word.slice(colon + 1)) : undefined;\n+\tconst answer = await api.without(v, leave);\n+\tif (!answer.ok)\n+\t\treturn {\n+\t\t\texit: EXIT.refused,\n+\t\t\ttext: refusalText(answer, (vs) => `abso show ${word} --without ${vs.join(\",\")}`),\n+\t\t\tjson: { ...answer },\n+\t\t};\n+\tif (path !== undefined) {\n+\t\tconst file = answer.files.find((f) => f.path === path);\n+\t\tif (file === undefined) {\n+\t\t\tconst same = await api.fileAt(path, v, { draft: null });\n+\t\t\tif (same.text !== null) return { text: same.text, json: { ...same, without: answer.without } };\n+\t\t} else if (file.after !== null) return { text: file.after, json: { ...file, without: answer.without } };\n+\t\treturn {\n+\t\t\texit: EXIT.error,\n+\t\t\ttext: `${path} isn't in version ${v} of shared without them.`,\n+\t\t\tjson: { path, version: v, without: answer.without },\n+\t\t};\n+\t}\n+\tconst changed = pairRenames(answer.files);\n+\tconst d = diffs(changed);\n+\tconst lines = [\n+\t\t...withoutHeading(answer),\n+\t\tchanged.length === 0 ? `No file differs from version ${v}.` : `Compared with version ${v}: ${totals(changed)}.`,\n+\t\t`The files hash to ${answer.tree}; the same ask gives the same hash. Shared doesn't change.`,\n+\t\t...d.text,\n+\t];\n+\treturn { text: lines.join(\"\\n\"), json: { ...answer, files: d.json } };\n+}\n+\n export async function runShow(args: Parsed, env: Env): Promise<Output> {\n \tif (args.positionals.length !== 1)\n \t\tthrow new UsageError(\"show takes one version: abso show <version> or abso show <version>:<file>\");\n@@ -432,6 +476,8 @@\n \tconst word = args.positionals[0]!;\n \tconst colon = word.indexOf(\":\");\n \tconst where = space(args, config.agent);\n+\tconst leave = withoutArg(args);\n+\tif (leave !== undefined) return showWithout(api, root, env.cwd, word, where, leave);\n \n \tif (colon >= 0) {\n \t\tconst v = version(word.slice(0, colon));"}],"unmatched":[]}