Parsing of gitignore files.

For details for the matching rules, see https://git-scm.com/docs/gitignore

Function translate Translate a shell PATTERN to a regular expression.
Function read_ignore_patterns Read a git ignore file.
Function match_pattern Match a gitignore-style pattern against a path.
Class Pattern A single ignore pattern.
Class IgnoreFilter No class docstring; 0/1 class methods, 3/5 methods documented
Class IgnoreFilterStack Check for ignore status in multiple filters.
Function default_user_ignore_filter_path Return default user ignore filter path.
Class IgnoreFilterManager Ignore file manager.
Function _translate_segment Undocumented
def _translate_segment(segment):
Undocumented
def translate(pat):

Translate a shell PATTERN to a regular expression.

There is no way to quote meta-characters.

Originally copied from fnmatch in Python 2.7, but modified for Dulwich to cope with features in Git ignore patterns.

def read_ignore_patterns(f):
Read a git ignore file.
ParametersfFile-like object to read from
ReturnsList of patterns
def match_pattern(path, pattern, ignorecase=False):
Match a gitignore-style pattern against a path.
ParameterspathPath to match
patternPattern to match
ignorecaseWhether to do case-sensitive matching
Returnsbool indicating whether the pattern matched
def default_user_ignore_filter_path(config):
Return default user ignore filter path.
ParametersconfigA Config object
ReturnsPath to a global ignore file
API Documentation for Dulwich, generated by pydoctor at 2018-11-17 19:05:54.