diff options
Diffstat (limited to '.githooks')
-rwxr-xr-x | .githooks/post-checkout | 13 | ||||
-rwxr-xr-x | .githooks/pre-commit | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/.githooks/post-checkout b/.githooks/post-checkout new file mode 100755 index 0000000..e02dfcf --- /dev/null +++ b/.githooks/post-checkout @@ -0,0 +1,13 @@ +#!/usr/bin/env sh +rm -rf ./git-prompt +git -c submodule.sha1collisiondetection.update=none clone --no-checkout --depth 1 https://github.com/git/git.git ./git-prompt &&\ +( + cd ./git-prompt || exit 110 + #mkdir -pv contrib/completion || exit 111 + #git show HEAD:contrib/completion/git-prompt.sh > contrib/completion/git-prompt.sh || exit 112 + git restore --staged contrib/completion/git-prompt.sh + git checkout contrib/completion/git-prompt.sh + # if you can't cope with git reporting a truckload of deleted files, do this: + #rm -rf .git + # ...mind you this will alwasys pull in the whole repository on checkout/clone. +) diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100755 index 0000000..2ec7e41 --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +git config --remove-section submodule.git-prompt +printf "submodule git-prompt has been removed. After pushing, don't forget to trigger the" +printf " post-checkout hook again.\\n" |