Skip to main content

main_worktree_root

Function main_worktree_root 

Source
pub fn main_worktree_root(root: &Path) -> Option<PathBuf>
Expand description

The main checkout of the linked git worktree at root, read from git’s own files without running git: <root>/.git is a file naming the worktree’s git dir, whose gitdir points back at that file and whose commondir names the repository’s .git directory of the main checkout. None for a main checkout, a bare repository, or files that do not agree with each other.