pub fn get_git_state_optional( root: impl AsRef<Path>, ) -> Result<Option<GitState>>
Get git state, or return None if not in a git repository
This is useful for indexing non-git projects where we fall back to a default branch.