pub struct PlannedMerge<'a> { /* private fields */ }Expand description
A merge that has been decided and not yet made.
The commit the trunk will land on is settled at construction and
every refusal has already happened, so the line announcing this merge
can be written before the trunk moves. PlannedMerge::apply is the
only way to move it, and Worktrees::plan_merge is this value’s
only source.
Implementations§
Source§impl PlannedMerge<'_>
impl PlannedMerge<'_>
Sourcepub fn commit(&self) -> String
pub fn commit(&self) -> String
The commit the city trunk will point at, for the line that says so.
Sourcepub fn apply(self, landing: &Landing<'_>) -> Result<(), StorageError>
pub fn apply(self, landing: &Landing<'_>) -> Result<(), StorageError>
Brings a node’s committed work into the city’s own trunk, as a merge commit carrying the merging run’s trailers. The judgement stays fast-forward only; what the history keeps is the merge commit, because a pointer move leaves nothing to read and no place to say who verified it.
§Errors
Propagates a trunk that cannot be read, committed onto or checked out. The fast-forward judgement is not repeated: it was made, and refused if it had to be, before this value existed.