summaryrefslogtreecommitdiff
path: root/hooks
diff options
context:
space:
mode:
authorGravatar Jan Beich2016-10-11 07:06:55 +0000
committerGravatar Jan Beich2016-10-27 23:28:29 +0000
commit3925f4ff63d05b2c4cf2c1543152c8ecfa0beb10 (patch)
tree1ac7bc3259f04f8eafe70dffb1ac941e0e3646f3 /hooks
parentTravis: only upload for push (#2134) (diff)
downloadyuzu-3925f4ff63d05b2c4cf2c1543152c8ecfa0beb10.tar.gz
yuzu-3925f4ff63d05b2c4cf2c1543152c8ecfa0beb10.tar.xz
yuzu-3925f4ff63d05b2c4cf2c1543152c8ecfa0beb10.zip
hooks: convert pre-commit to POSIX syntax
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 @@
1#!/bin/bash 1#!/bin/sh
2 2
3# Enforce citra's whitespace policy 3# Enforce citra's whitespace policy
4git config --local core.whitespace tab-in-indent,trailing-space 4git 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
32 if ! echo "$f" | egrep -q "^src/"; then 32 if ! echo "$f" | egrep -q "^src/"; then
33 continue 33 continue
34 fi 34 fi
35 d=$(diff -u "$f" <(clang-format "$f")) 35 d=$(clang-format "$f" | diff -u "$f" -)
36 if ! [ -z "$d" ]; then 36 if ! [ -z "$d" ]; then
37 echo "!!! $f not compliant to coding style, here is the fix:" 37 echo "!!! $f not compliant to coding style, here is the fix:"
38 echo "$d" 38 echo "$d"
@@ -40,4 +40,4 @@ for f in $(git diff --name-only --diff-filter=ACMRTUXB --cached); do
40 fi 40 fi
41done 41done
42 42
43exit "$fail" 43exit "${fail-0}"