Skip to main content

Module worktree_batch

Module worktree_batch 

Source
Expand description

Primitives shared by the batch-worktree git engines โ€” worktree_rebase and worktree_push.

Both engines answer the same two questions before they do anything specific: which worktrees is this batch about, and what is checked out in each. They also both need one carefully-configured git subprocess seam. Extracting that common half here keeps a second engine from re-deriving it โ€” the two would drift, and the subprocess seam in particular encodes a non-obvious environment-snapshot rule (see [run_git_in]) that is not safe to re-invent.

Nothing here decides anything: classification, the mutation, and the outcome shapes belong to each engine.

Enumsยง

Selection
Which worktrees a batch operation should target.