MultimatchCleanup
API reference › Diff › MultimatchCleanup
Holds the limits of Git’s cleanup of multi-matched lines, which LineDiffer applies before the alignment so
that lines repeated all over the other input do not anchor it.
The values match those of Git’s xprepare.c.
See also: https://github.com/git/git/blob/master/xdiff/xprepare.c (Git’s xprepare.c.).
Constants
Section titled “Constants”| Constant | Value | Description | Defined by |
|---|---|---|---|
KEEP_RUN | 4 | Multi-matched lines are discarded when they make up less than 1 / KEEP_RUN of the run of unmatched and multi-matched lines around them. | MultimatchCleanup |
MAX_EQUAL_LIMIT | 1024 | Upper bound of the occurrence count from which a line counts as multi-matched; below it the bound is the approximate square root of the line count. | MultimatchCleanup |
SCAN_WINDOW | 100 | Number of lines examined on each side of a multi-matched line when deciding whether to discard it. | MultimatchCleanup |