projects
/
pocl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c60631e
)
[PATCH 110/144] exit early if reformatting produced no changes
author
Andreas Beckmann
<anbe@debian.org>
Wed, 1 Dec 2021 20:42:38 +0000
(21:42 +0100)
committer
Andreas Beckmann
<anbe@debian.org>
Fri, 7 Jan 2022 23:55:22 +0000
(23:55 +0000)
Gbp-Pq: Name 0110-exit-early-if-reformatting-produced-no-changes.patch
tools/scripts/format-last-commit.sh
patch
|
blob
|
history
diff --git
a/tools/scripts/format-last-commit.sh
b/tools/scripts/format-last-commit.sh
index b0ab124a967650d0c83b217717457d0015c5dabf..4c48e998a9f8d62290c7f23567cec6303ca5d815 100755
(executable)
--- 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 ?"