summaryrefslogtreecommitdiffstats
path: root/git_hooks
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre.ledru@scilab.org>2011-12-13 18:39:17 +0100
committerClément DAVID <clement.david@scilab-enterprises.com>2011-12-14 10:55:02 +0100
commitca23d1dfcaf926375079627318ff0bc576515666 (patch)
tree88ce9089e42eaac5a67a35cbcf39453c6e27ba90 /git_hooks
parent2fc5a38c1604e092d54aa27b8ff95123458be3a9 (diff)
downloadscilab-ca23d1dfcaf926375079627318ff0bc576515666.zip
scilab-ca23d1dfcaf926375079627318ff0bc576515666.tar.gz
Factorize some codes in the git hooks
Change-Id: I79ec49ce2525941f83a5f35312e9c7d46104baf7
Diffstat (limited to 'git_hooks')
-rwxr-xr-xgit_hooks/pre-commit16
1 files changed, 2 insertions, 14 deletions
diff --git a/git_hooks/pre-commit b/git_hooks/pre-commit
index 59eb8c2..78fca1d 100755
--- a/git_hooks/pre-commit
+++ b/git_hooks/pre-commit
@@ -90,22 +90,10 @@ indent() {
90 do 90 do
91 local ext=$(expr "$file" : ".*\(\..*\)") 91 local ext=$(expr "$file" : ".*\(\..*\)")
92 case $ext in 92 case $ext in
93 .xcos) 93 .xcos|.xml)
94 __indent_Xml; 94 __indent_Xml;
95 ;; 95 ;;
96 .xml) 96 .h|.c|.hxx|.cpp)
97 __indent_Xml;
98 ;;
99 .h)
100 __indent_C;
101 ;;
102 .c)
103 __indent_C;
104 ;;
105 .hxx)
106 __indent_C;
107 ;;
108 .cpp)
109 __indent_C; 97 __indent_C;
110 ;; 98 ;;
111 esac 99 esac