diff options
Diffstat (limited to 'hooks')
-rw-r--r-- | hooks/pre-commit.hook | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hooks/pre-commit.hook b/hooks/pre-commit.hook index 34dd510..0024483 100644 --- a/hooks/pre-commit.hook +++ b/hooks/pre-commit.hook @@ -7,7 +7,8 @@ echo "--Checking style--" for file in `git-diff-index --name-only HEAD | grep "\.c$"` ; do -tempfoo=`basename $0` + test -f ${file} || continue + tempfoo=`basename $0` newfile=`mktemp /tmp/${tempfoo}.XXXXXX` || exit 1 indent \ --braces-on-if-line \ |