-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Finder]: GitIgnore unable to exclude a directory and its content #39257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Got exactly the same bug with this example:
Feel free to use it as fixture to reproduce the bug. 👍 |
I'm getting this with
in .gitignore (from here: https://github.com/Piwigo/Piwigo/blob/master/.gitignore#L9) |
fabpot
added a commit
that referenced
this issue
May 9, 2021
This PR was squashed before being merged into the 4.4 branch. Discussion ---------- Fix/Rewrite .gitignore regex builder | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | fix #39257 | License | MIT | Doc PR | no This PR fixes `.gitignore` with exclude wildcard ignore rules like `!a/*/b` were failing with `preg_match(): Compilation failed: lookbehind assertion is not fixed length at offset` PHP error. Functionality/performance was verified against large `.gitignore` files: - https://github.com/PrestaShop/PrestaShop/blob/1.7.7.3/.gitignore - https://github.com/dotnet/installer/blob/v5.0.202/.gitignore - https://github.com/dotnet/runtime/blob/v5.0.5/.gitignore This PR also improves the testing cases. Commits ------- 83f9fd3 Fix/Rewrite .gitignore regex builder
carlalexander
added a commit
to ymirapp/cli
that referenced
this issue
Jun 3, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected: >=4.4.12
Description
I'm trying to exclude a directory and its content. I have a configuration similar to the one described in #37560. I'm trying to keep all the content in
/example/test/
.This configuration will only retain the
/example/test
directory, but not its content. If I try a.gitignore
like the one below, PCRE breaks completely:PCRE doesn't handle lookbehind that don't have a fixed length. So the above
.gitignore
file will causepreg_match(): Compilation failed: lookbehind assertion is not fixed length
warnings. This, in turn, causes the whole.gitignore
regex to not work and none of the rules get enforced.The text was updated successfully, but these errors were encountered: