Skip to content

Commit

Permalink
Fixed pre-commit hook (vesoft-inc#103)
Browse files Browse the repository at this point in the history
Older Git does not support exclusive diff-filter.
  • Loading branch information
dutor authored Jan 15, 2019
1 parent 86426a4 commit 52d4f97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpplint/bin/pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if [ $# -eq 0 ];then
echo "You have unstaged changes, please stage or stash them first."
exit 1
fi
CHECK_FILES=$(git diff --name-only --diff-filter=d HEAD | egrep '.*\.cpp$|.*\.h$|.*\.inl$')
CHECK_FILES=$(git diff --name-only --diff-filter=ACMRTUXB HEAD | egrep '.*\.cpp$|.*\.h$|.*\.inl$')
else
CHECK_FILES=$(find $@ -not \( -path src/CMakeFiles -prune \) \
-not \( -path src/interface/gen-cpp2 -prune \) \
Expand Down

0 comments on commit 52d4f97

Please sign in to comment.