Expand description
Merge commit and combined (--cc / -c) diff helpers.
These mirror the subset of Git’s combine-diff output needed for porcelain
commands (git show, git diff during conflicts, git diff-tree -c).
Functions§
- blob_
oid_ at_ path - OID of the blob at
pathintree. - blob_
text_ for_ diff - Prepare blob bytes for diff: optional textconv when
use_textconvanddiff=<driver>. - blob_
text_ for_ diff_ with_ oid - Like
blob_text_for_diff, but usesrefs/notes/textconv/<driver>whendiff.<driver>.cachetextconvis true andblob_oidis known. - combined_
diff_ paths - Paths that differ between the merge result tree and every parent tree.
- convert_
blob_ to_ worktree_ for_ path - Blob bytes after smudge/EOL conversion for
path, using the same rules as checkout. - diff_
cachetextconv_ enabled - diff_
textconv_ active - Returns true when
pathhas adiff=<driver>attribute anddiff.<driver>.textconvis set. - diff_
textconv_ cmd_ line - format_
combined_ binary - Full combined diff for a binary path (two parents).
- format_
combined_ binary_ header - Combined diff header:
diff --combinedordiff --cc. - format_
combined_ textconv_ patch - Combined text diff with textconv (two parents, single-file focus).
- format_
parent_ patch diff --gitagainst parentpfor merge commit-moutput.- format_
worktree_ conflict_ combined git diff/git diff --ccduring 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
pathintree, orNoneif missing. - run_
textconv - Run
diff.<driver>.textconvfeedinginputon stdin; returns UTF-8 lossy text on success. - run_
textconv_ raw - Run
diff.<driver>.textconvoninput; returns raw stdout on success.