M config/pre-commit.hook => config/pre-commit.hook +13 -0
@@ 4,6 4,19 @@
#run pre-commit hooks
+if [[ $# -ne 0 ]]; then
+ cat <<-HELP_MSG &>1
+ This script doesn't support any parameters.
+
+ If you try to check style call:
+ ./config/style_check_hook.sh
+
+ If you try to check license header call:
+ ./config/license_header_check.sh
+ HELP_MSG
+fi
+
+
set -e
L_GIT_DIR=$(git rev-parse --show-toplevel)
pushd $L_GIT_DIR
M config/style_check_hook.sh => config/style_check_hook.sh +5 -0
@@ 175,6 175,11 @@ case "${1}" in
FIX=true
;;
*)
+ if [[ $# -ne 0 ]]; then
+ echo "unknown parameters: '$@'"
+ help
+ exit 1
+ fi
FILES=$(git diff-index --cached --name-only HEAD)
LAST="Stage"
FIX=$(git config user.fixinstage)