3 # Call `tidy --bless` before each commit
4 # Copy this scripts to .git/hooks to activate,
5 # and remove it from .git/hooks to deactivate.
10 # https://github.com/rust-lang/rust/issues/77620#issuecomment-705144570
12 ROOT_DIR="$(git rev-parse --show-toplevel)"
13 COMMAND="$ROOT_DIR/x.py test tidy --bless"
15 if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
16 COMMAND="python $COMMAND"
19 echo "Running pre-commit script '$COMMAND'"