module documentation
Parsing of gitignore files.
For details for the matching rules, see https://git-scm.com/docs/gitignore
Important: When checking if directories are ignored, include a trailing slash in the path. For example, use "dir/" instead of "dir" to check if a directory is ignored.
| Class | |
Filter to apply gitignore patterns. |
| Class | |
Ignore file manager with Git-compliant behavior. |
| Class | |
Check for ignore status in multiple filters. |
| Class | |
A single ignore pattern. |
| Function | default |
Return default user ignore filter path. |
| Function | match |
Match a gitignore-style pattern against a path. |
| Function | read |
Read a git ignore file. |
| Function | translate |
Translate a gitignore pattern to a regular expression following Git rules exactly. |
| Function | _check |
Check if a parent directory exclusion prevents negation patterns from taking effect. |
| Function | _handle |
Handle ** segment processing, returns (regex_part, skip_next). |
| Function | _handle |
Handle leading patterns like /**/, **/, or /. |
| Function | _parent |
Return parent directories for a path, with trailing slashes. |
| Function | _pattern |
Check if a pattern excludes a parent directory of the given path. |
| Function | _pattern |
Convert a pattern to string, handling both Pattern objects and raw patterns. |
| Function | _translate |
Translate a single path segment to regex, following Git rules exactly. |