Fix the format check script by applying it to the previous commit

Rather than just to local changes, which doesn't work as intended
This commit is contained in:
Marc Di Luzio 2018-04-16 17:52:48 +01:00
parent 52a99a2102
commit 53d15292c9

View File

@ -3,7 +3,7 @@
wget https://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/git-clang-format
chmod +x git-clang-format
CLANG_FORMAT_OUTPUT=$(./git-clang-format --diff)
CLANG_FORMAT_OUTPUT=$(./git-clang-format HEAD^ HEAD --diff)
if [[ ! $CLANG_FORMAT_OUTPUT == "no modified files to format" ]]; then
echo "Failed clang format check:"
echo "${CLANG_FORMAT_OUTPUT}"