summaryrefslogtreecommitdiffstats
path: root/hooks
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2016-10-11 09:06:55 +0200
committerJan Beich <jbeich@FreeBSD.org>2016-10-28 01:28:29 +0200
commit3925f4ff63d05b2c4cf2c1543152c8ecfa0beb10 (patch)
tree1ac7bc3259f04f8eafe70dffb1ac941e0e3646f3 /hooks
parentTravis: only upload for push (#2134) (diff)
downloadyuzu-3925f4ff63d05b2c4cf2c1543152c8ecfa0beb10.tar
yuzu-3925f4ff63d05b2c4cf2c1543152c8ecfa0beb10.tar.gz
yuzu-3925f4ff63d05b2c4cf2c1543152c8ecfa0beb10.tar.bz2
yuzu-3925f4ff63d05b2c4cf2c1543152c8ecfa0beb10.tar.lz
yuzu-3925f4ff63d05b2c4cf2c1543152c8ecfa0beb10.tar.xz
yuzu-3925f4ff63d05b2c4cf2c1543152c8ecfa0beb10.tar.zst
yuzu-3925f4ff63d05b2c4cf2c1543152c8ecfa0beb10.zip
Diffstat (limited to 'hooks')
-rwxr-xr-xhooks/pre-commit6
1 files changed, 3 insertions, 3 deletions
diff --git a/hooks/pre-commit b/hooks/pre-commit
index ec2b5b77e..04fdaf8ec 100755
--- a/hooks/pre-commit
+++ b/hooks/pre-commit
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Enforce citra's whitespace policy
git config --local core.whitespace tab-in-indent,trailing-space
@@ -32,7 +32,7 @@ for f in $(git diff --name-only --diff-filter=ACMRTUXB --cached); do
if ! echo "$f" | egrep -q "^src/"; then
continue
fi
- d=$(diff -u "$f" <(clang-format "$f"))
+ d=$(clang-format "$f" | diff -u "$f" -)
if ! [ -z "$d" ]; then
echo "!!! $f not compliant to coding style, here is the fix:"
echo "$d"
@@ -40,4 +40,4 @@ for f in $(git diff --name-only --diff-filter=ACMRTUXB --cached); do
fi
done
-exit "$fail"
+exit "${fail-0}"