pre-commit: fix indentation style

This commit is contained in:
Matthias Grob 2019-11-01 17:50:50 +01:00 committed by Daniel Agar
parent 5c0692e59e
commit cc06009932
1 changed files with 7 additions and 7 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
@ -50,16 +50,16 @@ fi
git diff-index --check --cached $against --
if [ $? -ne 0 ]; then
echo "Pre-commit style error: Whitespace issues"
exit 1
exit 1
fi
# Check for code style, only in changed files
for i in `git diff --cached --name-only --diff-filter=ACM`
do
./Tools/astyle/files_to_check_code_style.sh $i | xargs -n 1 -P 8 -I % ./Tools/astyle/check_code_style.sh %
if [ $? -ne 0 ]
then
./Tools/astyle/files_to_check_code_style.sh $i | xargs -n 1 -P 8 -I % ./Tools/astyle/check_code_style.sh %
if [ $? -ne 0 ]
then
echo "Pre-commit style error: Bad formatting according to astyle rules"
exit 1
fi
exit 1
fi
done