summaryrefslogtreecommitdiffstats
path: root/git_hooks
diff options
context:
space:
mode:
authorClément DAVID <clement.david@scilab.org>2011-06-23 15:28:07 +0200
committerSylvestre Ledru <sylvestre.ledru@scilab.org>2011-06-24 10:57:33 +0200
commitaa49bda4645fd2a661657d7e0e93eca90f902013 (patch)
treedf366f71e5560c6e9c03b52856ee7bb67cbc232f /git_hooks
parent46ea219aa3988043b615629341acbd1af12006a6 (diff)
downloadscilab-aa49bda4645fd2a661657d7e0e93eca90f902013.zip
scilab-aa49bda4645fd2a661657d7e0e93eca90f902013.tar.gz
deactivate pre-commit on in-progress state
Change-Id: I53f6f4460ef4f5aa77b515285e0eb6b584c8e159
Diffstat (limited to 'git_hooks')
-rwxr-xr-xgit_hooks/pre-commit22
1 files changed, 22 insertions, 0 deletions
diff --git a/git_hooks/pre-commit b/git_hooks/pre-commit
index 77d0502..c51fa92 100755
--- a/git_hooks/pre-commit
+++ b/git_hooks/pre-commit
@@ -3,7 +3,24 @@
3# Hook used to indent all xcos files before commiting 3# Hook used to indent all xcos files before commiting
4# 4#
5 5
6
7#
8# Pre-conditions
9#
10if test -d ".git/rebase-merge" || \
11 test -d ".git/rebase-apply" || \
12 test -f ".git/MERGE_HEAD" || \
13 test -f ".git/CHERRY_PICK_HEAD" || \
14 test -f ".git/BISECT_LOG"
15then
16 exit 0
17fi
18
19#
20# Configuration check
21#
6XMLLINT="$(git config --get hooks.xmllint)" 22XMLLINT="$(git config --get hooks.xmllint)"
23
7if test ! -x "$XMLLINT" 24if test ! -x "$XMLLINT"
8then 25then
9 echo "Unable to find xmllint executable on the configuration." 26 echo "Unable to find xmllint executable on the configuration."
@@ -37,6 +54,7 @@ then
37 echo 54 echo
38fi 55fi
39 56
57<<<<<<< HEAD
40if test -z "$(git config --get-all indent.ignored)" 58if test -z "$(git config --get-all indent.ignored)"
41then 59then
42 echo "Unable to find indent ignored list on the configuration, ignored" 60 echo "Unable to find indent ignored list on the configuration, ignored"
@@ -51,7 +69,11 @@ else
51 INDENT_IGNORED="$(find $(git config --get-all indent.ignored))" 69 INDENT_IGNORED="$(find $(git config --get-all indent.ignored))"
52fi 70fi
53 71
72=======
73#
74>>>>>>> 465c595... deactivate pre-commit on in-progress state
54# indent / format file by type 75# indent / format file by type
76#
55indent() { 77indent() {
56 # getting against as the current commit 78 # getting against as the current commit
57 if git rev-parse --verify HEAD >/dev/null 2>&1 79 if git rev-parse --verify HEAD >/dev/null 2>&1