Skip to main content

encode_worktree_name

Function encode_worktree_name 

Source
pub fn encode_worktree_name(relative_path: &str) -> String
Expand description

Encode a root-relative worktree path into a worktree admin name.

Replaces every / with ~. Called at the two sites that compute an admin name from a path — add_worktree and move_worktree — never anywhere else. Nothing decodes the result back into a path; a stored name is a label, not a key.