From 1585caf287a9ce22dcb6f2265a4380c93df0eb28 Mon Sep 17 00:00:00 2001 From: Hossain Khan Date: Mon, 16 Jun 2025 13:36:36 -0400 Subject: [PATCH] Update .githooks/pre-commit Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .githooks/pre-commit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 88e5483..85fb633 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -13,9 +13,9 @@ if [ $status -ne 0 ]; then fi # Check if there are unstaged changes after formatting -if [[ -n $(git status -s | grep "^.M") ]]; then +if [[ -n $(git diff --name-only --diff-filter=M) ]]; then echo "❌ Files were modified by formatKotlin. Please add these changes to your commit." - git status -s | grep "^.M" + git diff --name-only --diff-filter=M exit 1 fi