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
Create a no_skip ("enforce"?) whitelist/additive option for hooks and commands.
Value
Currently there is only a skip option for hooks and commands which is blacklist/subtractive behaviour. I often have commands that I want to execute only on particular branches. Since there is only a subtractive option, I have to implement additive behaviour myself by writing a custom script that checks the current git branch, and executes the command if I'm on one of the allowed branches. I'd rather not have to do that.
Common use case would be that I want to execute my test suite in a pre-commit hook only if I'm on master or hotfix/* branches. I cannot blacklist every other possible branch name, so I must create the workaround myself.
Behavior and configuration changes
Add a no_skip (or another word, but I can't find a good antonym for "skip") option that implements additive behaviour for hooks and commands.
The text was updated successfully, but these errors were encountered:
@mrexox Yes, your understanding is correct. Accept all possible skip values, but apply them the opposite way. I think the word only is a good choice 👍.
⚡ Summary
Create a
no_skip
("enforce"
?) whitelist/additive option for hooks and commands.Value
Currently there is only a
skip
option for hooks and commands which is blacklist/subtractive behaviour. I often have commands that I want to execute only on particular branches. Since there is only a subtractive option, I have to implement additive behaviour myself by writing a custom script that checks the current git branch, and executes the command if I'm on one of the allowed branches. I'd rather not have to do that.Common use case would be that I want to execute my test suite in a pre-commit hook only if I'm on
master
orhotfix/*
branches. I cannot blacklist every other possible branch name, so I must create the workaround myself.Behavior and configuration changes
Add a
no_skip
(or another word, but I can't find a good antonym for "skip") option that implements additive behaviour for hooks and commands.The text was updated successfully, but these errors were encountered: