Skip to main content

Module patch

Module patch 

Source

Enums§

ApplyMode

Functions§

apply_patch
Apply a patch using git apply.
apply_patch_to_index
Apply a patch using git apply against a specific index file.
build_patch
Reconstruct a minimal unified diff patch for a single hunk.
slice_hunk
Slice a hunk to only include changes within the given 1-based line range. Lines outside the range have their changes neutralized:
slice_hunk_multi
Slice a hunk keeping changes from any of the given 1-based line ranges.
slice_hunk_with_state
Slice a hunk using picked/selected state masks (for split command).