Skip to main content

repository_root

Function repository_root 

Source
pub fn repository_root(directory: &Path) -> Option<PathBuf>
Expand description

The work-tree root containing directory, or None if it is not a repo / git is unavailable. Mirrors git rev-parse --show-toplevel.