summaryrefslogtreecommitdiff
path: root/git-hooks
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2010-09-02 12:50:45 +0200
committerJan Holesovsky <kendy@suse.cz>2010-09-02 12:53:36 +0200
commit516d349c1fb01d02ecf1e332c3a77931ecfa973b (patch)
tree712e3217ca9e033fc4a9e540e9dff81e05bf755b /git-hooks
parent749251b733b7061bea464f484b800c1aa3c57180 (diff)
Don't test the patches for whitespace.
This leads to lots of false positives.
Diffstat (limited to 'git-hooks')
-rwxr-xr-xgit-hooks/pre-commit7
1 files changed, 6 insertions, 1 deletions
diff --git a/git-hooks/pre-commit b/git-hooks/pre-commit
index 19cebd81a..2153c0be2 100755
--- a/git-hooks/pre-commit
+++ b/git-hooks/pre-commit
@@ -83,6 +83,11 @@ if test -n "$ERRORS" ; then
fi
# git way of checking whitespace
-exec git diff-index --check --cached $against --
+FILTER_PATCHES=`git diff-index --check --cached $against -- | sed '/\.\(diff\|patch\):/,/.*/d'`
+if [ -n "$FILTER_PATCHES" ] ; then
+ echo "$FILTER_PATCHES"
+ exit 1
+fi
+exit 0
# vi:set shiftwidth=4 expandtab: