-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Need Support of pattern **folder #57
Comments
https://git-scm.com/docs/gitignore does always miss rules. I'm not sure if |
I've hit this issue now trying to use ESLint's
but it won't work as for an import:
the star will match |
@mgol Your case is not an issue of
It is better to read gitignore spec carefully. |
I posted it here because ESLint uses the If you consider this particular feature out of scope as it's not included in Git docs, I take it that maybe ESLint just shouldn't use the |
This topic had already been discussed in the eslint repo. To support both .gitignore-style pattern and fnmatch(3), or mutually translate these 2 kinds of patterns is not even possible. |
The docs mention that trailing |
Okay, I confirmed that in |
It looks to me that this sentence from https://git-scm.com/docs/gitignore is relevant:
So for In regex terms, each |
Could it be related to this?
|
The pattern **folder is currently not respected. This pattern is not documented in the official git documentation here https://git-scm.com/docs/gitignore but is enforced by git and is different from the pattern **/folder.
The difference
Will ignore the folder subfolder and the negation pattern will not work, as explained in the gitignore documentation.
While with those lines the file folder/subfolder/testFile.txt will be re-included as the pattern **subfolder does not match the folder subfolder but any file containing the string subfolder.
Actual behaviour:
Expected behaviour
The text was updated successfully, but these errors were encountered: