pub fn generate_worktree_path(
pattern: &str,
branch_name: &str,
) -> Result<PathBuf>Expand description
Generate the full path for a worktree.
Creates the worktree as a sibling directory of the main repository.
§Arguments
pattern- The path pattern (e.g., “{repo}-wt-{branch}”)branch_name- The branch name (will be slugified)
§Returns
Ok(PathBuf)- The full path where the worktree should be createdErr- If not in a git repository
§Example
use autom8::worktree::generate_worktree_path;
// If main repo is at /home/user/myproject, returns:
// /home/user/myproject-wt-feature-login
let path = generate_worktree_path("{repo}-wt-{branch}", "feature/login").unwrap();