fn detect_branch(repo: &Repository) -> Option<String>Expand description
Detects the current branch name.
Returns None if:
- HEAD is detached (pointing directly to a commit)
- HEAD is unborn (empty repository with no commits)
fn detect_branch(repo: &Repository) -> Option<String>Detects the current branch name.
Returns None if: