summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgit-hooks/post-merge4
-rwxr-xr-xscripts/install-git-hooks.sh2
2 files changed, 5 insertions, 1 deletions
diff --git a/git-hooks/post-merge b/git-hooks/post-merge
index 358290088..1fc8b582c 100755
--- a/git-hooks/post-merge
+++ b/git-hooks/post-merge
@@ -14,6 +14,10 @@ if [ ! $fresh_clone ] && [[ -z "$changes" ]]; then
exit
fi
+if echo "$changes" | grep scripts/install-git-hooks.sh; then
+ scripts/install-git-hooks.sh
+fi
+
# Make sure submodules are up to date
git submodule update --init --recursive
diff --git a/scripts/install-git-hooks.sh b/scripts/install-git-hooks.sh
index 9a76c3e35..05a7c9017 100755
--- a/scripts/install-git-hooks.sh
+++ b/scripts/install-git-hooks.sh
@@ -11,5 +11,5 @@ for hook in $HOOK_NAMES; do
# create the symlink, overwriting the file if it exists
# probably the only way this would happen is if you're using an old version of git
# -- back when the sample hooks were not executable, instead of being named ____.sample
- ln -s -f $SCRIPTS_DIR/hooks-wrapper.sh $HOOK_DIR/$hook
+ ln -r -s -f $SCRIPTS_DIR/hooks-wrapper.sh $HOOK_DIR/$hook
done