get_git_state_optional

Function get_git_state_optional 

Source
pub fn get_git_state_optional(
    root: impl AsRef<Path>,
) -> Result<Option<GitState>>
Expand description

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.