Skip to main content

Module diff

Module diff 

Source

Structs§

DiffHunk
A single diff hunk representing a contiguous region of changes
DiffLine
A single line in a diff
DiffStat
Stat summary for a file
FileDiff
A file-level diff result
WordDiffSegment
A segment of a word-level diff within a single line

Enums§

DiffLineKind
The type of a diff line
DiffOp
Edit operation from Myers diff
FileStatus
File status in a diff

Functions§

annotate_hunk_word_diff
Produce word-level diff segments for paired Remove/Add lines in a hunk
collect_tree_files
Collect all file paths from a tree recursively
diff_blobs
Diff two blobs, returning a FileDiff
diff_text
Diff two text strings, returning structured hunks
diff_trees
Diff two trees by their commit hashes, returning per-file diffs
myers_diff
Myers diff algorithm — computes the shortest edit script between two sequences
ops_to_hunks
Convert diff operations into hunks with context lines
word_diff_line
Compute word-level diff between two lines that were changed