From a6292a95cd697fbd92709334ada5380220065094 Mon Sep 17 00:00:00 2001 From: Helmut Eller Date: Fri, 26 Sep 2025 17:52:43 +0200 Subject: [PATCH] * build-aux/git-hooks/pre-commit (stats): Use staged changes --- build-aux/git-hooks/pre-commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-aux/git-hooks/pre-commit b/build-aux/git-hooks/pre-commit index 78562b81f61..f6915576e70 100755 --- a/build-aux/git-hooks/pre-commit +++ b/build-aux/git-hooks/pre-commit @@ -73,7 +73,7 @@ while IFS= read -r new_name; do done # Try to keep commits to MPS apart from commits to Emacs -stats=$(git diff --numstat "$head") +stats=$(git diff --cached --numstat "$head") nmpsfiles=$(printf "%s" "$stats"|grep --count ' mps/') nnonmpsfiles=$(printf "%s" "$stats"|grep --count --invert-match ' mps/')