Skip to main content

Module report

Module report 

Source
Expand description

Build-history orchestrator — the Rust analogue of git-diff.server.ts’s loadDocDiffTimelineReport + buildTimelinePoint + reportFromTimeline, restricted to one doc and build-history mode.

Ties the history git walk (Cluster A) to the pure diff/grouping layer (Cluster B): each revision becomes a DocDiffTimelinePoint carrying the doc’s line hunks and rendered block diff; the report selects the newest point as its head.

Functions§

build_doc_diff_report
Build the build-history report for one doc (doc_rel_path is relative to the repo root, e.g. "docs/guide/intro.md"). Returns Ok(None) when the doc has no commit history (graceful no-op).
build_doc_diff_report_with_blocks
Like build_doc_diff_report but attaching the rendered block diff to each file. Used by consumers that actually render blocks; the CLI build/history path does not (it projects only hunks), so it uses the cheaper default.
build_global_doc_diff_report
Build the global build-history report across all docs under docs_prefix (repo-relative, e.g. "docs"). Each timeline point is a commit carrying every doc file it changed — the analogue of the original global /docs/diff report. Returns Ok(None) when no commit touched the docs. With with_blocks, each file additionally carries its rendered block diff.