Lines 2–16 at 318 (were 2–8 at 176)
22// first used for #56, abso hosts abso). Each commit on the first-parent line 33// of --ref becomes a version of shared, oldest first: the first by `avcs 44// init`, each later one by a publish of that commit's tree, with the commit's 5−// message and a last line naming the commit, its author and its time.
5+// message and a last line naming the commit, its author and its time. When 6+// the repository's issues are on the web (origin on GitHub or GitLab, or 7+// --issues <url>), a line after it says where, so "#39" in the message, or 8+// in the lines it wrote, names that tracker's issue, not the project's: 10+// git 4e1a7c2b9f03, Ada Lovelace, 2026-10-06T20:36:43-05:00 11+// Issues: https://github.com/owner/repo/issues 13+// abso why and abso blame read these lines (client/src/git-origin.ts). 614// --last-only imports the last commit alone. 816// Before anything is created, the last commit is checked: abso stores text Lines 22–30 at 318 (were 14–20 at 176)
1422// What a first cut leaves for later (#58): every version's agent is the 1523// importing agent and its time is the import's (the commit's author and time 1624// are in the message); merges come in as their first parent's line; a run 17−// that stops partway goes on with --after <sha> in the same --dir.
25+// that stops partway goes on with --after <sha> in the same --dir. Version 0 26+// is made by init, which says "Start the project", so the first commit's own 27+// message and hash aren't on it: they're printed when the import starts. 1929// CI counts each imported version as seen as soon as it lands, so it never 2030// checks or bisects the history; it checks what is published after the Lines 32–38 at 318 (were 22–28 at 176)
2333// node client/scripts/import-git.ts --project <name> [--ref origin/main] 2434// [--server <url>] [--agent import] [--dir <empty folder>] 25−// [--last-only] [--check-only] [--after <sha>]
35+// [--last-only] [--check-only] [--after <sha>] [--issues <url>] 2737import { spawnSync } from "node:child_process"; 2838import { existsSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync } from "node:fs"; Lines 41–47 at 318 (were 31–36 at 176)
3141import { parseArgs } from "node:util"; 3242import { open } from "../src/commands.ts"; 3343import { loadIgnore } from "../src/folder.ts"; 44+import { issuesOf } from "../src/git-origin.ts"; 3445import { main } from "../src/main.ts"; 3647const { values } = parseArgs({ Lines 54–60 at 318 (were 43–48 at 176)
4354 "last-only": { type: "boolean", default: false }, 4455 "check-only": { type: "boolean", default: false }, 4556 after: { type: "string" }, 57+ issues: { type: "string" }, 4860const checkOnly = values["check-only"] === true; Lines 106–123 at 318 (were 94–105 at 176)
109+// Where "#N" in the history points: --issues, else origin's issues on GitHub or GitLab. 110+if (values.issues !== undefined && !/^https?:\/\/\S+$/.test(values.issues)) 111+ fail(`--issues is a web address, like https://github.com/owner/repo/issues (got ${JSON.stringify(values.issues)})`); 112+const tracker = values.issues ?? issuesOf(origin()); 97114const env = { cwd: dir, env: process.env, write: () => {} }; 99116for (let i = start; i < line.length; i++) { 100117 const sha = line[i]!; 101118 extract(sha, dir); 102− const message = `${git(["log", "-1", "--format=%B", sha]).trim()}\n\ngit ${sha.slice(0, 12)}, ${git(["log", "-1", "--format=%an, %aI", sha]).trim()}`;
119+ const message = `${git(["log", "-1", "--format=%B", sha]).trim()}\n\ngit ${sha.slice(0, 12)}, ${git(["log", "-1", "--format=%an, %aI", sha]).trim()}${tracker ? `\nIssues: ${tracker}` : ""}`; 120+ if (i === 0) console.log(`Version 0 is commit ${sha.slice(0, 12)}: ${message.split("\n")[0]}`); 103121 const subject = message.split("\n")[0]!.slice(0, 72); 104122 // The first commit makes the project; --as-is adds no starting .absoignore or avcs.json git never had. Lines 197–208 at 318 (were 179–184 at 176)
200+/** origin's address, or "" when there's no origin. */ 201+function origin(): string { 202+ const r = spawnSync("git", ["remote", "get-url", "origin"], { encoding: "utf8" }); 203+ return r.status === 0 ? r.stdout.trim() : ""; 182206function fail(message: string): never { 183207 console.error(message);