Skip to main content

validate_worktree_id

Function validate_worktree_id 

Source
pub fn validate_worktree_id(id: &str) -> bool
Expand description

Validate a linked-worktree id (the worktrees/<id> directory name).

Same shape as the git-bridge remote-name rule: ASCII alphanumeric plus ., _, -; non-empty; at most 255 bytes; never . or ... Keeps the id a single safe path component — no separators, no traversal, no NUL.