Commit aaeae58d authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

pre-commit hook: only check indentation of those files we're trying to commit...

pre-commit hook: only check indentation of those files we're trying to commit and not all locally modified files
parent 01ef6807
......@@ -19,7 +19,7 @@ INDENT_PARAMETERS="--braces-on-if-line \
--indent-level2"
echo "--Checking style--"
for file in `git-diff-index --name-only HEAD | grep "\.c$"` ; do
for file in `git-diff-index --cached --name-only HEAD | grep "\.c$"` ; do
test -f ${file} || continue
tempfoo=`basename $0`
newfile=`mktemp /tmp/${tempfoo}.XXXXXX` || exit 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment