Skip to main content

postprocess_diff_entries

Function postprocess_diff_entries 

Source
pub fn postprocess_diff_entries(
    odb: &Odb,
    entries: Vec<DiffEntry>,
    source_tree_oid: Option<&ObjectId>,
    work_root: Option<&Path>,
    worktree: Option<&DiffPostprocessWorktree<'_>>,
    config: &ConfigSet,
    thread_policy: &ThreadPolicy,
    opts: &DiffPostprocessOptions,
) -> Result<Vec<DiffEntry>>
Expand description

Apply break-rewrite, rename, and copy detection to a flat tree or index diff.

source_tree_oid supplies --find-copies-harder candidates; work_root is used when added entries carry a zero OID (index↔worktree). Pass worktree when break-rewrite runs on a tree↔worktree diff so worktree-side bytes honor attributes and filters.

§Errors

Propagates object read failures while evaluating break scores.