Skip to main content

diff_trees

Function diff_trees 

Source
pub fn diff_trees<S: ObjectSource + ?Sized>(
    store: &S,
    old_hash: Option<Hash>,
    new_hash: Option<Hash>,
) -> Result<DiffResult, StoreError>
Expand description

Compare two trees and return their DiffResult. None for either hash represents the empty tree (use cases: comparing against the initial commit, against a rolled-back state).

ยงErrors

Propagates StoreError when an expected tree object is missing or fails its read-time hash check.