-
Notifications
You must be signed in to change notification settings - Fork 237
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
panic: error parsing regexp #436
Comments
a workaround:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
With Talisman set up as a git hook, trying to commit a change containing a certain string can cause a
regexp
call to panic.To be more precise, if a file contains
git --diff
, this test passes and a diff content line is treated like a diff header line. Now if the line is too long, this will panic because we created a regex with a repeat count that exceeds regexp's hard limit of 1000.The error I get:
To Reproduce
Take a repo with Talisman set up a pre-commit hook and then run this command to create a file as described above:
Try to commit and see the panic message. If you delete one character from the previous line, Talisman runs fine.
The text was updated successfully, but these errors were encountered: