diff --git a/scripts/hooks/post-commit b/scripts/hooks/post-commit index 87f8998..8c90cd0 100755 --- a/scripts/hooks/post-commit +++ b/scripts/hooks/post-commit @@ -5,6 +5,11 @@ cd src packwiz refresh echo "post-commit: Adding changes to git" 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" git commit --amend --gpg-sign --no-edit --no-verify echo "post-commit: Done"