From 1a56dcd4da9f93598b3e9b0336bac67f6b482e04 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 16 Sep 2021 08:46:17 +0200 Subject: [PATCH] contrib: explicitly pass "-n" to "nm-code-format.sh" in "code-style-git-post-commit-hook" "nm-code-format.sh" is going to change the default behavior from "-n" to "-i", that is, from check-only to reformat. Explicitly pass "-n" where we want it. --- contrib/scripts/code-style-git-post-commit-hook | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/scripts/code-style-git-post-commit-hook b/contrib/scripts/code-style-git-post-commit-hook index 24c702c0c9..8d464842dc 100755 --- a/contrib/scripts/code-style-git-post-commit-hook +++ b/contrib/scripts/code-style-git-post-commit-hook @@ -17,5 +17,5 @@ CHANGED_FILES=$(git log --pretty='' --name-only -n1 | grep -E '\.c$|\.h$' | tr ' echo $CHANGED_FILES if [ -x "$FORMATTER" ] && [ ! -z "$CHANGED_FILES" ]; then - "$FORMATTER" "${CHANGED_FILES}" + "$FORMATTER" -n "${CHANGED_FILES}" fi