Created
May 11, 2011 20:12
-
-
Save catsby/967234 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
config_changed="false" | |
for rev in $(git diff HEAD@{1} HEAD --name-only) | |
do | |
if [[ $rev =~ "/config/" ]] | |
then | |
config_changed="true" | |
fi | |
done | |
if [ "$config_changed" = "true" ]; then | |
echo "**************************************************" | |
echo "The Config section has changed" | |
echo "**************************************************" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This git
post-merge
hook checks through all the files that have changed after the commit and displays a message at the end if any files within a certain directory have changed.Useful if you want to keep your eye out for any changes in a directory that shouldn't receive many changes.