pub fn current_ref(repo: &Path) -> Option<String>
The branch checked out in repo, or the short commit when HEAD is detached; None outside a repository.
repo
HEAD
None