Skip to main content

Module diff

Module diff 

Source
Expand description

Diff computation module for branchdiff

This module computes 4-way diffs showing changes across:

  • base (merge-base with main/master)
  • head (committed on branch)
  • index (staged)
  • working (working tree)

Re-exports§

pub use block::BlockKind;
pub use block::BlockMatch;
pub use block::ChangeBlock;

Modules§

block

Structs§

DiffInput
Input for computing a 4-way diff.
DiffLine
FileDiff
InlineSpan
Represents a span within a line for inline diff highlighting

Enums§

LineSource

Functions§

compute_four_way_diff
Compute 4-way diff: base→head→index→working. Uses provenance maps (not content similarity) to determine line sources. Inline diffs only created from explicit modification maps.