Versions 39 to 318
Lines 24–30 at 318 (were 24–30 at 39)
2424import { appendFileSync, mkdirSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
27−import { dirname, join } from "node:path";
2929
Lines 38–106 at 318 (were 38–66 at 39)
3838/** Set by the bundle's first line: an error after it came from the command, so it's never run again. */
4040
42+ * The checkout's git folders: its own (HEAD) and the shared one (refs, info/exclude). They are the same
43+ * folder in a plain clone; in a worktree .git is a file naming its own folder, which names the shared one.
64+
4165/** The checkout's commit, read from .git without running git; undefined if it can't be read. */
44− const head = readFileSync(join(root, ".git", "HEAD"), "utf8").trim();
47− try {
48− return readFileSync(join(root, ".git", ...ref.split("/")), "utf8").trim();
49− } catch {
50− const line = readFileSync(join(root, ".git", "packed-refs"), "utf8")
51− .split("\n")
52− .find((l) => l.endsWith(` ${ref}`));
53− return line?.split(" ")[0];
5986
60−/** Runs fn under a lock folder; a lock older than 10 minutes is a dead run's and is cleared. */
88+ * Runs fn under a lock folder, or not at all when another run holds it. A lock older than 10 minutes is a
89+ * dead run's: it is renamed aside before it's removed, so of two runs that find it stale only one takes it
63− if (Date.now() - statSync(lock).mtimeMs > 10 * 60 * 1000) rmSync(lock, { recursive: true, force: true });
Lines 164–170 at 318 (were 124–130 at 39)
127− const exclude = join(repo, ".git", "info", "exclude");
- MCP
- compare on this site's /mcp
- CLI
- abso diff 39 318 client/launch.mjs --json
- JSON
- /christopher/abso-core/compare/39..318?file=client%2Flaunch.mjs&format=json