Skip to main content

compose

Function compose 

Source
pub fn compose(
    p1: &Patch,
    p2: &Patch,
    author: &str,
    message: &str,
) -> Result<ComposeResult, ComposeError>
Expand description

Compose two patches into a single equivalent patch.

The patches must form a chain: P₂ must have P₁ as its direct ancestor.

§Arguments

  • p1 - The first (earlier) patch
  • p2 - The second (later) patch, must have p1.id in parent_ids
  • author - Author of the composition operation
  • message - Description of the composition

§Returns

A ComposeResult with the composed patch, or an error if composition is not possible.