Improve uncrustify.sh return code handling
[alexxy/gromacs.git] / admin / uncrustify.sh
index e9590bdab3d51b87b63ea7e01ac738fba3b5857d..1391214ec63de935bceea195b6f93d5bd9bffbeb 100755 (executable)
@@ -286,10 +286,10 @@ if [[ $action == diff-* ]] ; then
 fi
 
 # Find the changed files
+git diff --no-index --name-only --exit-code org/ new/ | \
+    sed -e 's#new/##' > $tmpdir/changed
 changes=
-set -o pipefail
-if ! git diff --no-index --name-only --exit-code org/ new/ | \
-         sed -e 's#new/##' > $tmpdir/changed
+if [[ -s $tmpdir/changed ]]
 then
     changes=1
 fi