diff options
author | Jan Holesovsky <kendy@suse.cz> | 2010-09-02 12:50:45 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2010-09-02 12:53:36 +0200 |
commit | 516d349c1fb01d02ecf1e332c3a77931ecfa973b (patch) | |
tree | 712e3217ca9e033fc4a9e540e9dff81e05bf755b /git-hooks | |
parent | 749251b733b7061bea464f484b800c1aa3c57180 (diff) |
Don't test the patches for whitespace.
This leads to lots of false positives.
Diffstat (limited to 'git-hooks')
-rwxr-xr-x | git-hooks/pre-commit | 7 |
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: |