Skip to main content

compute_tree_diff

Function compute_tree_diff 

Source
pub fn compute_tree_diff(
    repo: &Repository,
    from_change_id: &ChangeId,
    to_tree: &Tree,
    to_label: impl Into<String>,
    semantic: bool,
    unified: usize,
) -> Result<DiffReport>
Expand description

Compute a diff from an existing state to an in-memory tree.

Merge preview uses this for clean 3-way previews: the tree that would land has been computed, but no state has been committed yet. The top tree is installed in the object store so the existing semantic and rename-aware diff pipeline can address it by hash.