Skip to main content

attach_show_context

Function attach_show_context 

Source
pub fn attach_show_context(
    repo: &Repository,
    report: &mut DiffReport,
    state: &State,
    path_filters: &[String],
) -> Result<()>
Expand description

Fill report.context and report.broader_guidance from one Context attachment snapshot.

Selection:

  • changed report paths (including a rename old_path) when present;
  • otherwise the requested path_filters on a clean / filtered-empty tree, so diff --context -- lib.rs still rides;
  • otherwise every active file annotation (unfiltered clean tree).