Skip to main content

state_dir

Function state_dir 

Source
pub fn state_dir(
    layout: &RepoLayout,
    remote: &str,
) -> Result<PathBuf, BridgeError>
Expand description

<common dir>/git/<remote>/ — the per-remote bridge state directory (shared across worktrees, see mkit_core::layout). Remote names are restricted to the mkit ref-segment charset, minus ., so the directory name is always safe: this matches mkit-cli’s validate_remote_name (dot-free, on top of refs::validate_ref_name) rather than the ref grammar alone, so a name accepted here can never collide with the dot-leading temp directory remote rename uses (remote.rs::rename_state_dir) and the two bridge-state entry points (remote add/rename and mkit git import/export --remote-name) agree on what a valid state-dir name looks like.