Skip to main content

link_worktree

Function link_worktree 

Source
pub fn link_worktree(repo: &Repository, worktree_name: &str) -> Result<()>
Expand description

Plant gh-stack/gh-stack.lock symlinks for worktree_name, pointing at the canonical <common-dir>/gh-stack store. Idempotent; never replaces a real file — see migrate_worktree for that. Callers gate this on StackModel::GhStack themselves (see workon new’s hook); planting is harmless under any other model, but pointless.