pub fn encode_worktree_name(relative_path: &str) -> StringExpand 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.