Skip to main content

apply_patch_with_snapshots

Function apply_patch_with_snapshots 

Source
pub async fn apply_patch_with_snapshots(
    root: &Path,
    patch: &str,
    snapshot_max_bytes: usize,
) -> Result<PatchSummary>
Expand description

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.