Functionsยง
- format_
start_ only_ hunk_ header - Normalize hunk header to start-only form:
@@ -old +new @@. - is_
apply_ patch_ header_ line - Whether a line is an apply_patch operation header.
- is_
diff_ addition_ line - Whether a line is a unified diff addition content line (
+..., excluding+++marker). - is_
diff_ deletion_ line - Whether a line is a unified diff removal content line (
-..., excluding---marker). - is_
diff_ header_ line - Whether a line is a recognized diff metadata/header line.
- is_
diff_ new_ file_ marker_ line - Whether a line is a unified diff new-file marker (
+++ ...). - is_
diff_ old_ file_ marker_ line - Whether a line is a unified diff old-file marker (
--- ...). - language_
hint_ from_ path - Convert file path to language hint based on extension.
- looks_
like_ diff_ content - Heuristic classifier for unified/git diff content.
- parse_
diff_ git_ path - Parse
diff --git a/... b/...line and return normalized new path. - parse_
diff_ marker_ path - Parse unified diff marker line (
---/+++) and return normalized path. - parse_
hunk_ starts - Parse unified diff hunk header starts from
@@ -old,+new @@.