Skip to main content

Module diff_paths

Module diff_paths 

Source

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 @@.