scripts: pre-submit: Fail on meson format diff
Explicitly run git diff --exit-code.
When the --quiet argument was removed, the implicit --exit-code was
lost.
gitlint-ignore: UC1
Fixes: 566f2fc1a617 ("scripts: pre-submit: Print meson format diff on failure")
Change-Id: Ia890107b0a8accdf6e1602105487426d6e1ec1b4
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
diff --git a/scripts/pre-submit b/scripts/pre-submit
index dbf990d..59ecace 100755
--- a/scripts/pre-submit
+++ b/scripts/pre-submit
@@ -5,7 +5,7 @@
trap 'rm -rf "$BUILD"' EXIT
meson format --recursive --inplace || true
-if ! git diff
+if ! git diff --exit-code
then
echo Your changes must meet the upstream meson style guide
echo