From 499171ca64bcb32b0c2360daa505f84b62032d7a Mon Sep 17 00:00:00 2001 From: Lectem Date: Sat, 13 Jun 2015 22:20:56 +0200 Subject: [PATCH] enforce config from hook --- .gitconfig | 2 -- hooks/pre-commit | 35 ++++++++++++++++++----------------- 2 files changed, 18 insertions(+), 19 deletions(-) delete mode 100644 .gitconfig diff --git a/.gitconfig b/.gitconfig deleted file mode 100644 index 4cab7f2d9..000000000 --- a/.gitconfig +++ /dev/null @@ -1,2 +0,0 @@ -[core] - whitespace = blank-at-eol,trailing-space,tab-in-indent diff --git a/hooks/pre-commit b/hooks/pre-commit index 44010fa1a..bad84b14b 100644 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -1,23 +1,24 @@ #!/bin/sh -#check the config, in case the user really wants to allow tabs... -allowtabs=$(git config hooks.allowtabs) -if [ "$allowtabs" != "true" ] && - git diff --cached | egrep '^\+.* ' -then - cat<