pub fn default_branch(repo: &Path) -> Result<String>
Default branch: origin/HEAD’s target if it resolves locally; otherwise main; otherwise master.
Returns Err if no default branch is found.
Err