Salome HOME
dump the fuzzy value as attribute and not as double
[modules/shaper.git] / GitHooks / pre-commit.in
index 52e778fdf80f80972af4f466a63b411b6e92c5d1..02e3d563de4a4f6337ad318c5c84b412e6450496 100644 (file)
@@ -1,11 +1,5 @@
 #!/bin/bash
 
-function isDOSFile
-{
-  local FILENAME="$1"
-  file "$FILENAME" | grep -q "CRLF line terminators"
-}
-
 if git rev-parse --verify HEAD >/dev/null 2>&1
 then
   against=HEAD
@@ -44,21 +38,5 @@ EOF
   exit 1
 fi
 
-FOUND=0
 # If there are whitespace errors, print the offending file names and fail.
-if [ "$(exec git diff-index --check --cached $against -- )" != "" ]
-then
-  FOUND=1
-fi
-
-# Find files with DOS line endings
-for FILE in $(exec git diff --name-only --cached $against -- | sed '/^[+-]/d' | sed -r 's/:[0-9]+:.*//' | uniq) ; do
-  isDOSFile "$FILE"
-  if (( $? == 0 ))
-  then
-    echo "ERROR: \"$FILE\" has DOS line endings" >&2
-    FOUND=1
-  fi
-done
-
-exit $FOUND
+exec git diff-index --check --cached $against -- . ':(exclude)*.rst'