Builtin Library
README.md
zm.checkout
git checkout.
zm.checkout("feature")switches this session tofeature. Your uncommitted changes and staged entries come with you; a switch that would replace a path you changed with a different version refuses with git's message naming the paths, and nothing moves — commit orzm.stashfirst. Another caller's uncommitted changes stay on the branch they were made on. Returns once the branch's content has landed.zm.checkout("feature", { create = true })createsfeatureatHEAD(orstart) and switches to it.- In an agent's own client the user's client switches to the branch once this one has (its play/edit mode stays its own);
{ follow = false }leaves it where it is. In the user's clientfollowis false, and in a sub-client made withclient createit follows only with{ follow = true }. The user's client switches on its own time, so the call returns once this client has switched; the engine state'ssplitlists a sub-client that is on another world or branch than the user's client until the user's client has caught up, and a switch the user's client could not make is told to you as a notice. A switch to the branch this client is already on moves nothing. zm.checkout("", { paths = { p }, theirs = true })takes the merged-in side of an unmerged path whole (ourstakes the session branch's);zm.add(p)then records the resolution.zm.checkout("", { paths = { p }, rev = "HEAD~1" })writes the path as that revision holds it, and stages it.