Expand description
Parsing of unified patches
Structs§
- Binary
Patch - A binary patch
- Hunk
- A hunk in a patch
- Malformed
Hunk Header - An error that occurs when parsing a hunk header
- Malformed
Line - An error that occurs when parsing a hunk line
- Patch
Conflict - Conflict applying a patch
- Unified
Patch - A unified diff style patch
Enums§
- Error
- Errors that can occur while parsing a patch
- File
Entry - Parse a patch file
- Hunk
Line - A line in a hunk
- Plain
OrBinary Patch - A patch that can be applied to a single file
Constants§
- NO_NL
- The string that indicates that a line has no newline
Functions§
- difference_
index - Find the index of the first character that differs between two texts
- get_
patch_ names - Get the names of the files in a patch
- iter_
exact_ patched_ from_ hunks - Iterate through a series of lines with a patch applied.
- iter_
file_ patch - Iterate through a series of lines.
- iter_
hunks - Iterate over the hunks in a patch
- iter_
lines_ handle_ nl - Iterate through a series of lines, ensuring that lines that originally had no terminating newline are produced without one.
- parse_
patch - Parse a patch file
- parse_
patches - Parse a patch file
- parse_
range - Parse a patch range, handling the “1” special-case
- splitlines
- Split lines but preserve trailing newlines