GitCli.Worktree.Review (fnord v0.9.29)
View SourceShared interactive flow for reviewing, merging, and cleaning up a
fnord-managed worktree. Used by both Cmd.Ask (post-completion) and
Cmd.Worktrees merge.
Includes pre-merge and post-merge validation gates that run the project's configured validation rules against the worktree (before merge) and the main checkout (after merge). Post-merge validation failure triggers an automatic revert, while merge command failures are returned to the caller.
Summary
Functions
Merges worktree changes and cleans up without prompting. Runs validation before and after merge. Pre-merge validation failure blocks the merge.
Colorizes a unified diff string for terminal display.
Walks the user through inspecting the diff, merging, and optionally deleting the worktree and its local branch. Runs validation before and after merge.
Types
@type review_result() :: :ok | {:cleaned_up, merge_range(), :interactive | :auto} | {:validation_failed, :pre_merge | :post_merge, String.t()} | {:merge_failed, String.t()}
Functions
@spec auto_merge(String.t(), worktree_info(), keyword()) :: review_result()
Merges worktree changes and cleans up without prompting. Runs validation before and after merge. Pre-merge validation failure blocks the merge.
Colorizes a unified diff string for terminal display.
@spec interactive_review(String.t(), worktree_info(), keyword()) :: review_result()
Walks the user through inspecting the diff, merging, and optionally deleting the worktree and its local branch. Runs validation before and after merge.