Skip to main content

Crate docgen_diff

Crate docgen_diff 

Source
Expand description

docgen-diff — the doc-diff timeline port.

A pure-logic crate that owns the port of the original SvelteKit/TypeScript doc-diff timeline (~/work/docgen/packages/docgen/src/lib/diff). It keeps libgit2 out of docgen-core (whose pipeline tests stay fast and dependency-light) and mirrors the original’s split between pure diff algorithms (no git) and the git-driven orchestrator.

Re-exports§

pub use block_diff::build_block_diff;
pub use block_diff::split_markdown_blocks;
pub use block_diff::strip_invisible_document_parts;
pub use error::DiffError;
pub use file_tree::build_file_tree;
pub use git_parsing::parse_name_status;
pub use git_parsing::parse_untracked_docs;
pub use git_parsing::NameStatusEntry;
pub use git_refs::base_ref_for_commit_parents;
pub use git_refs::base_ref_for_parents;
pub use git_refs::EMPTY_TREE_REF;
pub use history::discover_repo;
pub use history::doc_revisions;
pub use history::global_doc_revisions;
pub use history::head_source;
pub use history::CommitMeta;
pub use history::GlobalFileChange;
pub use history::GlobalRevision;
pub use history::RevisionContent;
pub use line_diff::build_line_hunks;
pub use line_diff::build_line_hunks_default;
pub use payloads::summarize_file;
pub use payloads::summarize_report;
pub use payloads::summarize_timeline_point;
pub use report::build_doc_diff_report;
pub use report::build_doc_diff_report_with_blocks;
pub use report::build_global_doc_diff_report;
pub use timeline_groups::bucket_label;
pub use timeline_groups::format_date;
pub use timeline_groups::group_timeline;
pub use timeline_groups::ymd;
pub use timeline_groups::TimelineBucket;
pub use types::*;

Modules§

block_diff
Markdown block segmentation + block-level diff — a faithful port of block-diff.ts.
error
Error type for the git-driven layer.
file_tree
Changed-file tree grouping — a faithful port of file-tree.ts.
git_parsing
git --name-status / untracked parsing — a faithful port of git-parsing.ts.
git_refs
Base-ref selection — a faithful port of git-refs.ts.
history
Git history walk + blob content (git2 layer).
line_diff
Line-level hunk diff — a faithful port of line-diff.ts.
payloads
Payload summarization — a faithful port of payloads.ts.
report
Build-history orchestrator — the Rust analogue of git-diff.server.ts’s loadDocDiffTimelineReport + buildTimelinePoint + reportFromTimeline, restricted to one doc and build-history mode.
timeline_groups
Timeline date bucketing — a faithful port of timeline-groups.ts.
types
Core diff data model — a faithful port of types.ts.