Expand description
Parser for git diff-tree -r -U0 --no-renames patch output.
Count-driven: the @@ -a,b +c,d @@ header states exactly how many removed and
added lines follow, so hunk bodies are consumed by count, never by prefix
sniffing. (Prefix sniffing silently drops deleted lines that start with --:
deleting a line --help emits ---help, which a startswith("---") header
guard eats. That was a real latent bug in the validated prototype.)
Unknown lines are hard errors, not skips — a parser that guesses is how hunks get lost silently.
Functions§
- parse_
canonical - Parse the canonical
-U0 --no-renamespatch into aDiffView.