diff --git a/bin/tools/HookFunctions b/bin/tools/HookFunctions index 76ea7b3643..565ef123f7 100644 --- a/bin/tools/HookFunctions +++ b/bin/tools/HookFunctions @@ -103,7 +103,6 @@ dictBanner="(\ )*? \\\\\*---------------------------------------------------------------------------\*/" - #----------------------------------------------------------------------------- # @@ -399,7 +398,7 @@ checkBanner() for f in $fileList do fFile="${f##*/}" - [[ "$fFile" = *.* ]] && fExt="${fFile##*.}" || fExt="" + [[ "$fFile" = "*.*" ]] && fExt="${fFile##*.}" || fExt="" # Skip links if [ -h "$f" ] diff --git a/bin/tools/pre-commit-hook b/bin/tools/pre-commit-hook index d2d15b92e8..2ed5166c4d 100755 --- a/bin/tools/pre-commit-hook +++ b/bin/tools/pre-commit-hook @@ -98,10 +98,9 @@ fi #------------------------------------------------------------------------------ # Main code. Do all checks. -# # Builtin whitespace check to avoid trailing space, including CR-LF endings -bad=$(git diff-index --cached --check $against --) || die "$bad" +bad=$(git diff-index --cached --check $against -- ':(exclude)*.md') || die "$bad" # Check for illegal code, e.g. , etc checkIllegalCode