Skip to main content

format_worktree_error

Function format_worktree_error 

Source
pub fn format_worktree_error(
    error: &str,
    branch_name: &str,
    worktree_path: &Path,
) -> String
Expand description

Get detailed information about worktree creation failure.

Provides suggestions for how to resolve common worktree creation issues. Error messages follow the pattern: what happened → why → how to fix.

§Arguments

  • error - The error message from the failed git command
  • branch_name - The branch that was being created
  • worktree_path - The path where the worktree was being created

§Returns

A user-friendly error message with suggestions.