Skip to main content

Module patch

Module patch 

Source

Structs§

FileSnapshot
One file as it was before a patch touched it, with a fingerprint of what the patch left behind so a later restore can tell whether anything else has changed the file since.
PatchFileSummary
PatchSummary

Enums§

FileChange

Functions§

affected_paths
apply_patch
apply_patch_with_snapshots
snapshot_max_bytes caps how much of a file’s previous contents is kept for undo; anything larger is recorded as unrestorable instead of truncated, since a partial restore would corrupt the file.
coalesce_snapshots
Collapses a rewind range into one entry per path, describing the whole range rather than each patch in it.
content_hash
Cheap content fingerprint. Only ever compared against another fingerprint this program produced, so a non-cryptographic hash is enough.