Coming from jj
loot takes jj's working model nearly whole: the working copy is a change, a change keeps its id across rewrites, and an operation log lets you undo. Where loot differs, the reason is the same each time: it signs and syncs its history, and some of what it records is a key that cannot be taken back.
What carries over
| jj | loot |
|---|---|
@, the working-copy commit | @, the working change |
jj describe -m, jj new | loot describe -m, loot new |
| change id, commit id | change id (letters k to z), version id (hex) |
jj op log, jj undo, jj op restore | loot op log, loot undo, loot op restore <n> |
jj edit, jj evolog | loot edit <change-id>, loot evolog <change-id> |
squash, split, absorb, duplicate | the same verb names |
abandon | loot revert; loot abandon only drops a version of a divergent change |
jj rebase -s, jj rebase -b | loot move <change> --onto <parent>, with --branch for the whole line |
| revsets | a smaller revset language: x..y, ancestors(), descendants(), author() over a public-key prefix, description(), and visible() for changes you can open in full |
Where loot differs
Only mutating verbs snapshot
jj snapshots the working copy at the start of most commands. loot captures the tree at the start of each verb that changes the repo, and never on a read: status, log, diff and show record nothing. The snapshot is also visibility-aware: a path you cannot open is carried forward, never read as deleted.
new signs
A snapshot never signs. loot new is the signing boundary, and only signed changes travel. It refuses a change with no description, because the message becomes its permanent subject: run loot describe -m first, or loot new -m.
The change id is signed and travels
A change id is 16 random bytes minted when the change begins. It travels with the change, and the signature covers it beside the version id, so nobody can relabel signed content under a different change id. When two writers rewrite one change, you get a divergent change: loot log marks it with a trailing !, and loot abandon <version-id> keeps the other version.
Amending is signed supersession
loot edit reopens a finalized change that has no children; it refuses one with descendants. Finalizing records the new version with the old one named as its predecessor, inside the signed data, so a peer holding the old version sees it superseded rather than divergent. loot evolog lists every version a change id has had.
Undo stops at disclosure
The operation log is local and never synced, and operations are numbered. push, grant, maroon and pull-grants are barriers: a key or a change may already be at a peer, so undo will not cross them, and it never touches the keyring or the grant record. Reverse those forward instead. See Undo and recover.
$ loot op log | head -2
op 6 push push → http://127.0.0.1:47391 heads {cbe58548} ⚠ barrier
op 5 new finalize cbe58548 heads {cbe58548}
$ loot undo
loot: refusing to undo across a barrier (op 6, push → http://127.0.0.1:47391).
a push discloses; it cannot be retracted by undo. to reverse a published change, record a new change or `loot maroon` the path.Revsets refuse the ambiguous
..y is refused, because git and jj read it differently; write ancestors(y) or name the left end. x.. means x..HEAD. As a selector, HEAD is the last signed change and @ the working change. Inside a revset, HEAD means the live heads, which include a recorded working change, and loot prints a note when the two readings differ.
No templates
There is no template language and no --template flag. Verbs with a machine shape take --porcelain or --json; see Porcelain and --json contracts.
What jj has no counterpart for is per-path visibility. Start with Core ideas in five minutes.