From 26fde15195330b2a833b8a666609e95c335cf905 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 29 Jul 2022 15:03:43 -0400 Subject: [PATCH] scripts: Diff less I think check-format.sh might get into trouble in some cases when a non source file gets changed. This commit makes the diffing more targeted --- scripts/check-format.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/check-format.sh b/scripts/check-format.sh index 2e313189..652bd3fe 100755 --- a/scripts/check-format.sh +++ b/scripts/check-format.sh @@ -17,11 +17,15 @@ if [ "$DIRTY_TREE" -ne 0 ]; then fi find -name '*.[ch]' -exec uncrustify -q -c latest-uncrustify-config.cfg --replace {} \; -git diff > after + +echo > after +find -name '*.[ch]' -exec git diff -- {} \; >> after git reset --hard $UPSTREAM_BRANCH find -name '*.[ch]' -exec uncrustify -q -c latest-uncrustify-config.cfg --replace {} \; -git diff > before + +echo > before +find -name '*.[ch]' -exec git diff -- {} \; >> before interdiff --no-revert-omitted before after > diff