Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t.sh
32 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Git storage hardened, pages in tens of milliseconds, honest security alerts, and costs reconciled daily1import assert from "node:assert/strict";
2import { test } from "node:test";
3
4import { parseCommitMessage } from "./commit-message.ts";
5
6test("co-authors leave the body and keep only their names", () => {
7 const parsed = parseCommitMessage(
8 "Document every option\n\nAdds the missing rows.\n\nCo-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>",
9 );
10 assert.equal(parsed.subject, "Document every option");
11 assert.equal(parsed.body, "Adds the missing rows.");
12 assert.deepEqual(parsed.coAuthors, ["Claude Sonnet 5.5"]);
13 assert.deepEqual(parsed.trailers, []);
14});
15
16test("a message that is only trailers has no body", () => {
17 const parsed = parseCommitMessage("Fix it\n\nCo-Authored-By: Ada <ada@example.com>\nG1t-Pull: syntaqx/hello#72");
18 assert.equal(parsed.body, "");
19 assert.deepEqual(parsed.coAuthors, ["Ada"]);
20 assert.deepEqual(parsed.trailers, [{ key: "G1t-Pull", value: "syntaqx/hello#72" }]);
21});
22
Merge commit authors and hovercards: commits show their accounts, every name opens a card (repos 0016)23test("a trailer shows its name, never an address", () => {
24 const parsed = parseCommitMessage("Fix it\n\nSigned-off-by: Ada <ada@private.example>\nReviewed-by: <sam@x.io>");
25 assert.deepEqual(parsed.trailers, [{ key: "Signed-off-by", value: "Ada" }]);
26});
27
Git storage hardened, pages in tens of milliseconds, honest security alerts, and costs reconciled daily28test("prose that happens to contain a colon stays prose", () => {
29 const parsed = parseCommitMessage("Fix it\n\nNote: this also renames a function.\nAnd tidies the tests.");
30 assert.equal(parsed.body, "Note: this also renames a function.\nAnd tidies the tests.");
31 assert.deepEqual(parsed.coAuthors, []);
32});

This file's history is long; its oldest lines are credited to the oldest commit read.