Skip to main content

diff_trees_with_renames

Function diff_trees_with_renames 

Source
pub fn diff_trees_with_renames(
    odb: &Odb,
    old_tree_oid: Option<&ObjectId>,
    new_tree_oid: Option<&ObjectId>,
    prefix: &str,
    rename_threshold: u32,
) -> Result<Vec<DiffEntry>>
Expand description

Diff two trees and pair deleted/added paths as renames when content is similar enough.

rename_threshold is Git’s -M percentage (0–100, inclusive). Use RENAME_DETECTION_DISABLED to skip rename detection.

§Errors

Propagates errors from diff_trees.