is_worktree

Function is_worktree 

Source
pub fn is_worktree(repo_path: &Path) -> Result<bool>
Expand description

Check if a directory is a git worktree (not a submodule)

Worktrees have gitdir paths containing “/worktrees/”. Submodules have gitdir paths containing “/modules/”.