git_rev_parse_toplevel

Function git_rev_parse_toplevel 

Source
pub fn git_rev_parse_toplevel(dir: &Path) -> Result<PathBuf>
Expand description

2026-09-26: The repository root that contains dir, from git itself.

ยงErrors

If git cannot run, or dir is not inside a git working tree.