Skip to main content

place_diff

Function place_diff 

Source
pub fn place_diff(
    index: DiffIndex,
    root: &Path,
    candidate_bases: &[PathBuf],
    label: &str,
) -> Result<DiffIndex, DiffStandDown>
Expand description

Place a parsed diff under the directory its paths are relative to.

A diff that parsed but names no analyzable head-side file (empty, deletion-only, or binary-only) changed nothing a finding can be attributed to. That is a real, EMPTY scope, not an unplaceable base: the empty index is kept so every source-anchored finding filters out. Only a diff that cannot be placed (foreign or ambiguous base) stands down, and the run then reports at full scope.

ยงErrors

Returns the foreign-namespace or ambiguous-base stand-down.