Expand description
Structs§
- Base
- The branch a plan compares with
- Item
- One worktree, or a local branch with no worktree, and what the plan does with it. Only
planandplan_worktreemake one, and a caller can read but never change it, soexecuteonly ever removes what the plan judged safe: - Options
- What to compare with, and whether to remove worktrees with changes or a missing folder too
- Plan
- Every worktree and local branch
planjudged - Surveyed
- A linked worktree and how far its work landed, None when no base branch resolves
Enums§
- Action
- What
executedoes with an item - Done
- What
executedid - Keep
- Why a plan keeps a worktree or branch
- State
- How far a worktree’s or branch’s work landed in the base
Functions§
- execute
- Remove every worktree and delete every branch the plan marks
Action::Remove. Each commit it lets go of is saved underrefs/git-cow/deleted/<seconds>-<pid>-<call>/first, and an item that moved since the plan stays - is_
extra_ checkout - Whether
pathis a git-cow extra checkout of the repository atrepo: under a.git-cowfolder, atcow.base, or with the lock file git-cow keeps beside each one. git lists real paths whilecow.basemay go through a symlink, so both sides are resolved - plan
- Judge every worktree of the repository at
dir, and every local branch with no worktree, against the base. It changes nothing - plan_
worktree - Judge only the worktree at
wt, as a tool does with a worktree it made once its work landed. The plan has that one item, and deletes its branch only if no other worktree has it - squash_
check_ works - Whether this git can tell a squash merge: it needs
patch-id --verbatimand--attr-source, both in git 2.40. Without them squash-merged branches show as active and stay - survey
- Every linked worktree of the repository at
dirbut the extra checkouts, with how far its work landed. It reads only commits and refs, never a worktree’s files, so no filter or hook a repository sets can run, which makes it fit for repositories you did not make