Skip to main content

resolve_default_branch

Function resolve_default_branch 

Source
pub fn resolve_default_branch(start: &Path) -> Result<String>
Expand description

Resolve the default branch name for a repository.

Tries origin/HEAD first (works after git clone), then falls back to checking if main or master exist as local branches.