From 5f8bc701bed88566f89b9d9224de4a5c7686c8cc Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sun, 24 Mar 2024 04:24:10 -0400 Subject: [PATCH] updated git hook --- scripts/hooks/pre-commit | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/hooks/pre-commit b/scripts/hooks/pre-commit index 38f498d..f0bcb17 100755 --- a/scripts/hooks/pre-commit +++ b/scripts/hooks/pre-commit @@ -6,6 +6,7 @@ packwiz refresh echo "pre-commit: Adding changes to git" git add . echo "pre-commit: Amending commit with refreshed files" -PREV_COMMIT=$(git rev-parse HEAD) -git commit --no-edit --no-verify --reuse-message="$PREV_COMMIT" +PREV_COMMIT=$(git log -1 --pretty=%B) +git commit --amend --no-edit --no-verify --reuse-message="$PREV_COMMIT" echo "pre-commit: Done" +exit 0