#!/bin/bash
OUTPUT=$(git clang-format --diff)
if [ "${OUTPUT}" == "no modified files to format" ] ||
   [ "${OUTPUT}" == "clang-format did not modify any files" ];then
    exit 0
else
    echo "Run git clang-format, then commit."
    exit 1
fi
