pub fn is_work_tree(dir: &Path) -> bool
Whether dir sits inside a git work tree. False when git is missing entirely, which is the same practical answer for every caller here.
dir