Expand description
Input sanitisation for branch components and worktree root paths.
Every value that ends up in a git invocation passes through one of the
functions here before being used. This module is the enforcement point for
the NEVER invariants in the spec:
- branch components are validated before use
- root paths are canonicalised and confined to the repository tree
Functionsยง
- canonicalize_
root - Canonicalises
rootrelative torepo_root, rejecting paths that escape the repository. - validate_
branch_ component - Validates that
sis safe to use as a git branch component.