exit early if reformatting produced no changes
@@ -22,6 +22,11 @@ RELPATH=$(dirname "$SCRIPTPATH")
$RELPATH/clang-format-diff.py -regex '.*(\.h$|\.c$|\.cl$)' -i -p1 -style GNU <$PATCHY
$RELPATH/clang-format-diff.py -regex '(.*(\.hh$|\.cc$))|(lib/llvmopencl/.*\.h)' -i -p1 -style LLVM <$PATCHY
+if [ -z "$(git diff)" ]; then
+ echo "No changes."
+ exit 0
+fi
+
git diff
echo "ACCEPT CHANGES ?"
