pub fn resolve_mainline(
primary: &Git,
flag: Option<&str>,
config_mainline: &str,
) -> Result<String, GitError>Expand description
Mainline resolution, in order of precedence:
--mainline flag > config mainline > the primary checkout’s current
branch > origin/HEAD > main/master > error.
The checked-out branch outranks origin/HEAD, so a run started — or
resumed — from a checkout on a build branch publishes to that branch,
and the checkout follows what it publishes. origin/HEAD is consulted
only when the primary checkout is detached.