Skip to content

Commit

Permalink
Merge pull request #110 from Redot-Engine/fix/husky
Browse files Browse the repository at this point in the history
Enhance Pre-Commit Hook to Skip Whitespace-Only Changes
  • Loading branch information
charlottewiltshire0 authored Mar 3, 2025
2 parents 7607c54 + a0802df commit 4b96ccb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,15 @@ if [ $? -ne 0 ]; then
exit 1
fi

# Stage changes made by Prettier
echo "📂 Staging formatting changes..."
git add .

# Ensure there are staged changes before proceeding
if git diff --cached --quiet; then
echo "❌ No changes to commit."
exit 1
fi

echo "✅ All pre-commit checks passed! 🎉"
exit 0

0 comments on commit 4b96ccb

Please sign in to comment.