Created
January 16, 2019 11:47
-
-
Save Chocimier/7fa9d4125fe91746f0f3521a5feb3fb9 to your computer and use it in GitHub Desktop.
void-packages commit-msg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# commit-msg hook | |
if grep -q 'update to' "$1"; then | |
if git diff --staged | grep -qP '^( |\+)revision=1$'; then | |
: | |
else | |
echo 'On update, revision need to be 1. ~hook' | |
exit 1 | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment