Skip to main content

Module git

Module git 

Source
Expand description

git2 backend for the Vcs trait: the only module that may touch git2 (test fixtures aside).

Structs§

GitVcs

Constants§

DEFAULT_CONTEXT_LINES
git’s own default amount of context around hunks.
DEFAULT_INDENT_HEURISTIC
git’s own default: on, matching modern git’s behaviour.

Functions§

rehunk_file
Re-diff a file’s own old/new text at context lines of surrounding context (u32::MAX for the whole file) and algorithm, yielding the hunks the diff pane would show at that context. None for binary files or when a side’s text is absent, so the caller keeps its current hunks.