Skip to content

Commit

Permalink
Pass caret negation
Browse files Browse the repository at this point in the history
  • Loading branch information
tomruk committed Apr 24, 2023
1 parent 6b58e23 commit 57fbd3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pathspec/patterns/gitwildmatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ def _translate_segment_glob(pattern: str) -> str:
# - "[]-]" matches ']' and '-'.
# - "[!]a-]" matches any character except ']', 'a' and '-'.
j = i
# Pass brack expression negation.
if j < end and pattern[j] == '!':
# Pass bracket expression negation.
if j < end and (pattern[j] == '!' or pattern[j] == '^'):
j += 1
# Pass first closing bracket if it is at the beginning of the
# expression.
Expand Down

0 comments on commit 57fbd3e

Please sign in to comment.