Skip to main content

Module command_worktree

Module command_worktree 

Source
Expand description

Whether a git worktree invocation creates or moves a worktree. What: The one fact the wrapper needs about git worktree: whether the invocation creates or moves a worktree. Why: Only git worktree add and git worktree move are sources of ignored-state synchronization, and the worktree-copy opt-out is written after that second word.

In TS you’d write (pseudocode):

// changesWorktreeRegistrations(['add', '../topic']) === true

Functions§

changes_worktree_registrations
What: Whether the tokens after worktree start with add or move. &[OsString] borrows those tokens; bool is true or false. Why: The caller decides from this alone, without reading the subcommand’s options, so a mistaken option table can never hide a worktree creation.