pub fn default_branch(dir: &Path) -> Result<String>
Detect the default branch via origin/HEAD, falling back to main then master.