Skip to main content

Module worktree

Module worktree 

Source
Expand description

Isolated checkouts, one per task.

Work happens in a worktree so that a change is a diff on disk before it is anything else — reviewable by an agent that did not write it, and discardable without touching the branch anyone else is on.

Structs§

SetupProblem
What went wrong getting a worktree ready to work in.
Worktree

Functions§

commit
Commits the staged change inside the worktree, as the agent that wrote it.
create
diff
The change a run produced, as a diff against the base ref.
has_a_commit
Whether this repository has a commit to branch from.
is_repository
Creates a worktree for a run, branching from base_ref. Whether this directory is somewhere git can make a worktree.
linked
Whether one of the workspace’s directories reached this worktree as a link.
list
Every worktree this project has created, by path.
notes_linked
Makes a fresh checkout usable: links what git ignores, runs what the project says it needs.
prepare
release
Removes a worktree, keeping the branch it was on.
release_path
Removes a worktree by path, for one that has outlived its run.
restage
Stages whatever is in the worktree now and names the resulting tree.
staged_paths
Every path the staged change adds, removes or modifies.
touched_paths
Lists paths modified inside a worktree.
tree
The tree the index holds right now, as git names it.