Expand description
Jj backend. Shells out only to the jj CLI (never raw git) plus the standalone patch(1)
tool for applying diffs - a secondary jj workspace add’d directory has no .git of its
own (only the canonical repo’s own default workspace is colocated with git), so git apply
isn’t available there. jj commit snapshots the working copy directly, so patch(1) editing
files on disk is enough; no index of any kind needs updating.
Checkout::Refwith afork:jj git remote add <remote_name> <remote_url>(skipped ifjj git remote listalready has it -addisn’t idempotent), thenjj git fetch -b <branch> --remote <remote_name>, giving the revset<branch>@<remote_name>.Checkout::Refwith nofork(the PR’s source fork was deleted): unsupported for now - there’s no remote/branch left to track and no raw-git fallback per the above. Callers should suggest the git backend for that review instead.Checkout::Patches:basemust already be reachable (fetched as part of some branch’s history) - the jj backend has no by-SHA fetch to fall back on;Noneresolves to jj’s owntrunk()revset alias.add_workspace/update_workspace:jj workspace add --name rq-<name> -r <revset> <ws>/jj new <revset>(run from insidews), then each patch is applied withpatch -p1andjj commit -m. jj stamps a commit’s author when it’s created as an empty node, not whenjj commitlater finalizes it - so authors are pre-stamped one step ahead via--config user.name=.../user.email=...on whichever call creates the commit that will receive that patch (the initialworkspace add/newfor the first patch, the previous patch’scommitfor the rest). Verified with a local spike before relying on it.- Every
add_workspace/update_workspacecall pins its resulting head under areview-queue/<name>/<version>bookmark (jj bookmark create/set). This isn’t optional bookkeeping the way it might seem: a spike showed that without it, a force-pushed PR branch causesjj git fetchto abandon the old head on re-fetch (git.abandon-unreachable-commitsdefaults totrue), breaking interdiffing. The pin keeps it reachable regardless of what the remote branch does next. is_dirty:@isn’t empty, or@-isn’t the expected id (the stack tip) or one of its ancestors.position:jj new <commit>(neveredit, which would rewrite the stack).remove_workspace:jj workspace forget,rm -rf, and delete everyreview-queue/<name>/*bookmark.