Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix(pre-commit): only re-stage files that were already staged

rcourtmana9f342c09e86
diff --git a/.husky/pre-commit b/.husky/pre-commit
index 5d9a0bf0d0..69c37bc823 100755
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -49,7 +49,8 @@ if [ -f frontend-modern/package.json ]; then
cd ..
fi
-# Stage formatted files
-git add -u
+# Re-stage only files that were already staged (to pick up formatter changes)
+# This avoids accidentally committing unrelated work-in-progress files
+git diff --cached --name-only -z | xargs -0 -r git add
echo "Pre-commit checks passed!"