You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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: