pub fn resolve_audit_base(
root: &Path,
explicit: Option<&str>,
) -> Result<ResolvedAuditBase, AuditBaseError>Expand description
Resolve the base ref of an audit rooted at root.
The order is: the explicit ref, then the FALLOW_AUDIT_BASE override
(issue #1168: a consumer can pin the base without editing a generated gate
script), then auto-detection. Each ref is validated before git sees it.
ยงErrors
Returns AuditBaseError::InvalidRef for a ref that is not a valid git
ref, and AuditBaseError::NotDetected when no base branch can be found.