Skip to content

IndexError: list index out of range in pattern_to_regex #44

@sanderland

Description

@sanderland

I encountered an exeption in pathspec when
This line gives an error when the string "!\n" is passed, specifically due to a stray linebreak in the .gitignore file.
https://github.com/cpburnz/python-path-specification/blob/master/pathspec/patterns/gitwildmatch.py#L112

I am not sure what the expected behaviour is here, but it may be best to ignore rather than crash on the line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions