Factorize some codes in the git hooks 39/5639/2
Sylvestre Ledru [Tue, 13 Dec 2011 17:39:17 +0000 (18:39 +0100)]
Change-Id: I79ec49ce2525941f83a5f35312e9c7d46104baf7

git_hooks/pre-commit

index 59eb8c2..78fca1d 100755 (executable)
@@ -90,22 +90,10 @@ indent() {
        do
                local ext=$(expr "$file" : ".*\(\..*\)")
                case $ext in
-               .xcos)
+               .xcos|.xml)
                        __indent_Xml;
                ;;
-               .xml)
-                       __indent_Xml;
-               ;;
-               .h)
-                       __indent_C;
-               ;;
-               .c)
-                       __indent_C;
-               ;;
-               .hxx)
-                       __indent_C;
-               ;;
-               .cpp)
+               .h|.c|.hxx|.cpp)
                        __indent_C;
                ;;
                esac