-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Description
^ is escaped, but it works with gitignore.
To test it:
mkdir test && cd test
git init
echo 'a[^b]c' > .gitignore
touch abc azc
git status -u --ignoredNotice that abc doesn't match but azc does match. pathspec's behavior with ^ is inconsistent with Git.
I read:
| # POSIX declares that the regex bracket expression negation |
But I didn't understand why would you prefer to be compatible with POSIX and Python's fnmatch.translate when you could be compatible with gitignore itself. May I ask what led you to the decision to escape ^?
Metadata
Metadata
Assignees
Labels
No labels