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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user