pub fn detect_git_status(root: &Path) -> (Option<String>, usize)Expand description
Fetch branch and dirty-file count in a single git subprocess.
git status --porcelain=v1 --branch prints one header line
(## branch-name...tracking-info or ## HEAD (no branch)) followed
by one line per dirty path. Parsing both from one spawn halves the
subprocess cost of super::workspace::WorkspaceSnapshot::capture.