The change DAG
History is a directed acyclic graph of change versions. Edges point from a version to its parents, and loot orders history by those edges alone.
Nodes and edges
Each node is one version of a change, named two ways:
- The version id, in hex digits: a hash of the author's key, the message, the parents, the tree and any superseded versions. It moves on every rewrite.
- The change id, in the letters
ktoz: random, minted when the change begins, and carried unchanged through every rewrite.
Parents are version ids. A first change has none, ordinary work has one, and a merge has two. loot new signs the version id together with the change id, so nobody can relabel signed content. The when column in loot log is a clock reading the author signed. It's advisory and never decides order.
Heads and merges
A head is a version nothing else builds on. Two people who start from the same point and both record work have two heads, one line each, once their histories meet. loot heads lists them. loot pull folds independent heads into one line with a merge change, and loot converge does the same with no fetch. loot merge <head> folds just the head you name. Content both sides edited goes through a three-way merge, and anything it can't settle is recorded as a conflict for you to answer: see Resolve a conflict.
Amending
loot edit <change-id> reopens a finalized tip change. When you finalize, loot signs a new version that keeps the change id and names the old version as its predecessor. The old version stays in the store but is superseded, so loot log stops listing it. The predecessor link is signed and travels, so a peer who pulls your amend sees a replacement, not a second version. loot evolog <change-id> lists every version a change has had.
Divergence and the ! marker
A divergent change is one change id with more than one live version. A version is live when it is in the graph, not abandoned and not superseded. It happens when two writers amend the same change independently: each new version supersedes the original, but neither supersedes the other. loot log marks each such row with a trailing !. Here alice and bob each amended change qltrmtmm with loot edit and loot new. Alice pushed, then bob pulled:
change version when message vis author qltrmtmm! f53195c4 2026-10-06 03:42:01 UTC draft intro (alice) 1f275308… qltrmtmm! 834bd537 2026-10-06 03:42:01 UTC draft intro (bob) bob wytqollt f2695a11 2026-10-06 03:41:46 UTC add readme 1f275308… qvqoslmx — — (working change, empty) bob
The author column shows a key prefix for alice because bob hasn't registered her key with loot peer add.
Divergence isn't a tree conflict, and loot never content-merges two versions of one change. Pick the survivor yourself:
loot abandon f53195c4 # drop alice's version here; bob's stays live
loot abandon deletes nothing: the version stays in the store. The choice is recorded only in this repo and doesn't travel, so every repo that sees the divergence makes its own choice. A later pull that brings the version back leaves it abandoned. loot edit refuses a divergent change id until you do.
Two terms sound alike. Diverged heads are separate lines that loot pull merges. A divergent change is one handle with two live versions, marked !, which only loot abandon settles.