Expand description
Selectable line-diff algorithms, shared by every diff source. Myers,
Minimal and Patience are git2’s own (see crate::git); Histogram
and Structural (which layers reformat detection on top, in
crate::syntax::intraline) run through imara-diff, since libgit2 has no
histogram implementation.
Structs§
- Diff
Settings - The line-diff context, algorithm and indent heuristic every diff source honours, threaded through construction so the review’s long-lived backend and every worker that opens a fresh one read the same values and can never drift apart.
Enums§
Functions§
- histogram_
hunks - Line hunks of
oldvsnewcomputed by imara-diff’s histogram algorithm, grouped withcontextunchanged lines around each change the way git itself merges nearby hunks together (mirrors imara-diff’s ownunified_diffgrouping rule, without needing its text printer).file_pathseeds the hunk ids the same waycrate::gitdoes, so staging can find the hunk it shows regardless of which algorithm produced it, as long as both read the current algorithm.