Skip to main content

branch

Function branch 

Source
pub fn branch(dir: &Path) -> Option<String>
Expand description

The current branch name, or None when detached / not a repo. A detached HEAD yields the short commit hash via the caller’s discretion (here None).