drm_hwcomposer: CI: Use git diff to feed the clang-format-diff
When using git show, false positives happen, while git diff works fine.
Change-Id: Idde7c46aa1808493116c21cc155b9806fe4dfe2d
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
diff --git a/.ci/.gitlab-ci-checkcommit.sh b/.ci/.gitlab-ci-checkcommit.sh
index 1ca2876..5649475 100755
--- a/.ci/.gitlab-ci-checkcommit.sh
+++ b/.ci/.gitlab-ci-checkcommit.sh
@@ -61,7 +61,7 @@
exit 1
fi
- git show -U0 "$h" -- | clang-format-diff-19 -p 1 -style=file > /tmp/format-fixup.patch
+ git diff -U0 "$h" -- | clang-format-diff-19 -p 1 -style=file > /tmp/format-fixup.patch
if [ -s /tmp/format-fixup.patch ]; then
cat /tmp/format-fixup.patch >&2
exit 1