Skip to main content

Module merge_diff

Module merge_diff 

Source
Expand description

merge_diff API (re-exported at this path).

Functions§

all_blob_paths_in_tree_order
All blob paths in tree_oid, depth-first in Git tree entry order (for diff / log --rotate-to / --skip-to).
blob_oid_at_path
OID of the blob at path in tree. path uses the reversible repo_relpath::storage_string representation.
blob_text_for_diff
Prepare blob bytes for diff: optional textconv when use_textconv and diff=<driver>.
blob_text_for_diff_with_oid
Like blob_text_for_diff, but uses refs/notes/textconv/<driver> when diff.<driver>.cachetextconv is true and blob_oid is known.
combined_diff_paths
Paths that differ between the merge result tree and every parent tree.
combined_merge_parent_blob_paths
Per-parent blob paths for a combined merge path when rename detection is enabled.
convert_blob_to_worktree_for_path
Blob bytes after smudge/EOL conversion for path, using the same rules as checkout.
diff_attr_external_driver
Resolved external diff driver from a path’s diff=<name> attribute.
diff_attr_forces_binary
True when a path carries the -diff (or diff=unset / binary) attribute, which forces Git to emit Binary files ... differ regardless of content.
diff_attr_forces_text
True when a path carries a bare diff (set) attribute, which forces Git to produce a textual diff even when the blob contains NUL bytes (t4020 #65).
diff_cachetextconv_enabled
diff_cachetextconv_enabled function.
diff_forced_binary_by_driver
Force Binary files ... differ when the path’s diff driver sets binary, except for symlinks.
diff_textconv_active
Returns true when path has a diff=<driver> attribute and diff.<driver>.textconv is set.
diff_textconv_cmd_line
diff_textconv_cmd_line function.
enrich_combined_path_renames
Enrich a combined diff path with per-parent rename info (-M/-C).
format_combined_binary
Full combined diff for a binary path (two parents).
format_combined_binary_header
Combined diff header: diff --combined or diff --cc.
format_combined_binary_header_n
index line for N-parent combined/binary diffs (p1,p2,...pn..result).
format_combined_textconv_patch
Combined text diff with optional textconv (N parents, single merge path).
format_worktree_conflict_combined
git diff / git diff --cc during a conflict: worktree file with markers.
is_binary_for_diff
True if diff should treat this path as binary (NUL in blob or -diff / diff=unset).
read_blob_at_path
Read the blob at path in tree, or None if missing. path uses the reversible repo_relpath::storage_string representation.
run_textconv
Run diff.<driver>.textconv feeding input on stdin; returns UTF-8 lossy text on success.
run_textconv_raw
Run diff.<driver>.textconv on input; returns raw stdout on success.