Skip to main content

get_branch_info

Function get_branch_info 

Source
pub fn get_branch_info() -> BranchInfo
Expand description

Get detailed branch information, using cache if available.

Returns a BranchInfo enum indicating:

  • Branch(name): On a named branch
  • DetachedHead(hash): In detached HEAD state (with optional commit hash)
  • NotGitRepo: Not in a git repository