Expand description
Vimdiff merge tool layout generation compatible with Git’s mergetools/vimdiff driver.
This mirrors the shell logic in git/mergetools/vimdiff so grit mergetool and tests can
share one implementation. Layout strings use only ASCII (LOCAL, BASE, REMOTE, MERGED,
separators +, /, ,, and parentheses).
Structs§
- Vimdiff
GenCmd - Result of
vimdiff_gen_cmd: the-c "..."vim argument body and the save target pane.
Functions§
- vimdiff_
cmd_ without_ base - When no base version exists, Git rewrites buffer indices in the vim command (
2b→quit, etc.). - vimdiff_
executable_ for_ tool - Executable name for a vimdiff-family merge tool (
vim,gvim,nvim). - vimdiff_
final_ cmd_ script - Inner script passed to
vim -f -c '<script>'(without the outer-cwrapper). - vimdiff_
gen_ cmd - Computes
FINAL_CMDandFINAL_TARGETfrom a layout string, matchinggen_cmdin Git’s vimdiff driver. - vimdiff_
merge_ argv_ no_ base - Builds argv when the common ancestor is missing:
LOCAL REMOTE MERGEDonly, aftervimdiff_cmd_without_base. - vimdiff_
merge_ argv_ with_ base - Builds argv for
vim -f -c '...' LOCAL BASE REMOTE MERGED(base present), matching Git’smerge_cmdeval. - vimdiff_
resolve_ layout - Resolves the layout string for a merge tool name, matching
merge_cmdin Git’s vimdiff script.