Repository navigation
Do not run legacy script again when this is the one being executed - #981
Conversation
|
hmm this shouldn't be possible as the legacy script only will get created if it isn't our script (unless there's a bug in that!): pre-commit/pre_commit/commands/install_uninstall.py Lines 85 to 87 in da00fa9 Do you have a reproduction for how that copy script is getting created? |
yeah, the
Unfortunately, I don't. I will ask for more information to the workmate to which it happened, but I am pretty sure he didn't create it himself. |
|
pre-commit scripts have |
|
Hmmm well if you can reproduce the situation I'd rather fix the bug than bandaiding over it 🤔 |
|
I agree a fix would definitely be a plus here, but IMOH you should prevent the fork bomb either way. is enough to hang your computer at next commit. |
|
My problem with the current PR is it attempts to fix something which is impossible and would hide a bug if it did exist. If you adjust it to |

This patch fixes an infinite process recursion when
.git/hooks/pre-commit.legacyexecutes itself over and over. I don't know exactly how and why thispre-commit.legacyfile was created but it is a copy of.git/hooks/pre-commit