From: Andreas Beckmann Date: Wed, 1 Dec 2021 20:42:38 +0000 (+0100) Subject: [PATCH 110/144] exit early if reformatting produced no changes X-Git-Tag: archive/raspbian/1.8-3+rpi1^2~35 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1f4f4c6730fe09bf0420f3687f3475486ee53461;p=pocl.git [PATCH 110/144] exit early if reformatting produced no changes Gbp-Pq: Name 0110-exit-early-if-reformatting-produced-no-changes.patch --- diff --git a/tools/scripts/format-last-commit.sh b/tools/scripts/format-last-commit.sh index b0ab124..4c48e99 100755 --- a/tools/scripts/format-last-commit.sh +++ b/tools/scripts/format-last-commit.sh @@ -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 ?"