pub fn next_for(
root: &Path,
base: &str,
head: &str,
policy: &ReleasePolicy,
) -> Result<LandingDecision, Unreadable>Expand description
What a landing of head onto base allocates in the repository at root: the trunk’s
version is the manifest at base; the movement is the committed registry where head
forked from base against head’s, and the changed paths are git’s over the same span.
Measuring from the fork point is what makes the movement the pull request’s own: a head
that is behind base lacks what base added since, and read against base itself that
absence would count as a removal it never made. Everything is read from git, so the
answer is the same in any checkout and does not depend on which executable runs.
use majordomus_cli::release::landing::{next_for, ReleasePolicy};
// a directory that is no repository has no trunk to raise from
let err = next_for(std::path::Path::new("/"), "origin/master", "HEAD", &ReleasePolicy::default());
assert!(err.is_err());