pub fn get_default_branch(repo: &Repository) -> Result<String>Expand description
Get the default branch name for a repository, validated to exist.
This function:
- Checks the
init.defaultBranchconfig - Falls back to “main” if it exists
- Falls back to “master” if it exists
- Returns an error if none exist