summaryrefslogtreecommitdiffstats
path: root/git_hooks
diff options
context:
space:
mode:
authorClément DAVID <clement.david@scilab-enterprises.com>2015-12-18 14:43:44 +0100
committerFrancois Granade <francois.granade@scilab-enterprises.com>2016-01-04 10:37:47 +0100
commit8a25b71013882d634167c05332caadb68b9ecfc4 (patch)
treeb7b384830df21542fd5af1c2be8b1580aa0dc73a /git_hooks
parentba619bd268c6eb1164eb206f98c88ec5b82e7942 (diff)
downloadscilab-8a25b71013882d634167c05332caadb68b9ecfc4.zip
scilab-8a25b71013882d634167c05332caadb68b9ecfc4.tar.gz
Indentation hooks: allow XMLINDENT and ASTYLE pre-set
To disable the indentation hooks for only a specific commit, you can now use : $ XMLINDENT=/bin/true git commit or $ ASTYLE=/bin/true git commit Change-Id: If09f32336fece63de1e473bbbb19b7e450a92ed5
Diffstat (limited to 'git_hooks')
-rwxr-xr-xgit_hooks/pre-commit10
1 files changed, 8 insertions, 2 deletions
diff --git a/git_hooks/pre-commit b/git_hooks/pre-commit
index 6ffc063..5aaab76 100755
--- a/git_hooks/pre-commit
+++ b/git_hooks/pre-commit
@@ -19,7 +19,10 @@ fi
19# 19#
20# Configuration check 20# Configuration check
21# 21#
22XMLINDENT="$(git config --get hooks.xmlindent)" 22if test ! -x "$XMLINDENT"
23then
24 XMLINDENT="$(git config --get hooks.xmlindent)"
25fi
23if test ! -x "$XMLINDENT" 26if test ! -x "$XMLINDENT"
24then 27then
25 echo "Unable to find xmlindent executable on the configuration." 28 echo "Unable to find xmlindent executable on the configuration."
@@ -45,7 +48,10 @@ else
45 XMLINDENT_IGNORED="$(find $(git config --get-all xmlindent.ignored))" 48 XMLINDENT_IGNORED="$(find $(git config --get-all xmlindent.ignored))"
46fi 49fi
47 50
48ASTYLE="$(git config --get hooks.astyle)" 51if test ! -x "$ASTYLE"
52then
53 ASTYLE="$(git config --get hooks.astyle)"
54fi
49if test ! -x "$ASTYLE" 55if test ! -x "$ASTYLE"
50then 56then
51 echo "Unable to find astyle executable on the configuration." 57 echo "Unable to find astyle executable on the configuration."