Skip to main content

Module worktree_remove_plan

Module worktree_remove_plan 

Source
Expand description

The plan of a git worktree remove that names one directory and no option. What: The plan for one git worktree remove that the wrapper may serve with a subvolume destroy: the one directory it names. Why: Only the plain form (one directory, no option, a non-empty name) is served; --force and every other option change what Git checks, and a name Git resolves by its last path component is not a directory here, so those stay with Git.

In TS you’d write (pseudocode):

const plan = parseRemovePlan(['worktree', 'remove', '../topic'], 0, cwd); // undefined: Git removes it

Structs§

RemovePlan
What: The worktree a git worktree remove <path> names, resolved to a directory that exists. Why: The removal needs the worktree’s real path; Git also accepts a unique last component, which the wrapper leaves to Git by finding no such directory.

Functions§

parse_remove_plan
What: Plan one invocation of git worktree remove that names exactly one directory and no option. Why: --force and every other option change what Git checks, so those forms stay with Git.