fixed infinite looping in the post-commit hook
This commit is contained in:
parent
0a81a57d48
commit
e4c6fb3cec
1 changed files with 5 additions and 0 deletions
|
@ -5,6 +5,11 @@ cd src
|
||||||
packwiz refresh
|
packwiz refresh
|
||||||
echo "post-commit: Adding changes to git"
|
echo "post-commit: Adding changes to git"
|
||||||
git add .
|
git add .
|
||||||
|
echo "post-commit: Checking for changes"
|
||||||
|
if git diff-index HEAD --; then
|
||||||
|
echo "post-commit: No changes detected, exiting"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
echo "post-commit: Amending commit with refreshed files"
|
echo "post-commit: Amending commit with refreshed files"
|
||||||
git commit --amend --gpg-sign --no-edit --no-verify
|
git commit --amend --gpg-sign --no-edit --no-verify
|
||||||
echo "post-commit: Done"
|
echo "post-commit: Done"
|
||||||
|
|
Reference in a new issue