Added Git Hooks

This commit is contained in:
EliteMasterEric 2023-10-09 12:02:19 -04:00
parent 5617f8f63e
commit 2a3f5bc5db
4 changed files with 14 additions and 0 deletions

5
.github/hooks/README.md vendored Normal file
View File

@ -0,0 +1,5 @@
# Git Hooks
These work even on Windows because of Git Bash.
## Setup
`git config core.hooksPath .github/hooks`

2
.github/hooks/post-checkout vendored Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
git submodule update --init --recursive

2
.github/hooks/post-merge vendored Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
git submodule update --init --recursive

5
.github/hooks/pre-push vendored Normal file
View File

@ -0,0 +1,5 @@
#!/bin/sh
if git diff --cached --submodule | grep -q "^+"; then
echo "WARNING: You have unpushed changes in submodules."
exit 1
fi