Skip to main content

Module model

Module model 

Source
Expand description

Diff model: files, hunks, lines.

Structs§

BlobIds
Hex blob ids of a file’s two sides. A working-tree side’s id has no object behind it in the store.
DiffLine
DiffModel
FileDiff
HashCache
Memo for FileDiff::content_hash and FileDiff::sides_hash, which the UI reads every frame. Always compares equal so FileDiff equality is on data.
Hunk
HunkId
Hash of a hunk’s content, so it survives edits elsewhere in the file.

Enums§

FileStatus
LineKind

Functions§

disambiguated_hunk_id
hunk_id with seen counting occurrences across one file’s hunks.
hunk_id
occurrence counts earlier hunks in the file with the same content, so identical hunks get distinct ids. Prefer disambiguated_hunk_id.