diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2009-01-22 10:46:35 +0100 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2009-01-22 10:46:35 +0100 |
commit | 42581d4ebf41013f91b57a30d8f3cbf7e56e478c (patch) | |
tree | 3265dbb1ebfa1584dffafb2503e731935435bae5 /hooks | |
parent | 137543b7e782c811bc88bf9210323e7e75835d18 (diff) |
Fix pre-commit hook for moved/deleted files
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 \ |