Skip to main content

build_change_context

Function build_change_context 

pub fn build_change_context<R: Repo>(
    db: &FactsDb,
    repo: &R,
    opts: &Options,
    paths: &[String],
) -> Result<String>
Expand description

Assemble and render the pre-write briefing for paths.

Runs each feed analysis once for the whole batch (forcing min_revs = 1 and clearing the row limit so a briefing finds its targets regardless of --rows), picks per-path values, and renders the deterministic text described in the module docs. Reads the fact store only.

§Errors

Returns CodeLoreError::InvalidOptions (naming the MAX_BRIEFING_PATHS limit) when paths is empty or longer than the limit, and propagates any analysis or fact-store error from the feeds.