Skip to main content

worktree_dir_name

Function worktree_dir_name 

Source
pub fn worktree_dir_name(project: &str, branch: &str) -> String
Expand description

Builds the worktree directory name from a project name and branch.

Replaces / with - and strips characters that are unsafe for directory names.

ยงExamples

  • ("git-paw", "feature/auth-flow") โ†’ "git-paw-feature-auth-flow"
  • ("git-paw", "fix/db") โ†’ "git-paw-fix-db"