Expand description
User-defined and built-in diff function-name matching.
This module implements the subset of Git’s userdiff behavior needed for
hunk-header function context extraction.
Structs§
- Funcname
Matcher - Compiled function-name matcher used for diff hunk headers.
Constants§
- GIT_
WORD_ REGEX_ DEFAULT_ SUFFIX - Default word-regex suffix Git appends for built-in drivers (
userdiff.cPATTERNSmacro). - GIT_
WORD_ REGEX_ FALLBACK - Built-in extended word regex when no driver matches (Git
userdiff“default” driver).
Functions§
- builtin_
word_ regex - Returns the driver-specific word-regex pattern fragment plus whether it uses
REG_ICASE. - matcher_
for_ driver - Resolve a function-name matcher for a named diff driver.
- matcher_
for_ path - Resolve a function-name matcher for
rel_pathfrom attributes + config. - matcher_
for_ path_ parsed - Like
matcher_for_pathbut uses parsed.gitattributesrules fromcrate::attributes. - word_
regex_ pattern_ for_ path_ parsed - Effective word-diff regular expression for
rel_path(Gitdiff.wordRegex+ driver + builtins).