pub async fn create_worktree(
repo_path: PathBuf,
worktree_path: PathBuf,
branch_name: String,
start_ref: String,
) -> Result<(), GitError>Expand description
Re-exported worktree and branch-detection APIs. Creates a git worktree at the specified path with a new branch.
§Arguments
repo_path- Path to the git repository rootworktree_path- Path where the worktree should be createdbranch_name- Name of the new branch to createstart_ref- Git ref used as the new worktree branch starting point
§Returns
Ok(()) on success, Err(GitError) on failure.
§Errors
Returns GitError::CommandFailed if spawning fails or the worktree
command exits with a non-zero status.