X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fetc%2Fpre-push.sh;h=2a3086338b4bfe0591961272c2ac9582213ae574;hb=d6e79ab9c859cb06da0798f24ac31e1e33c932d3;hp=be7de3ebaf5712979fc6976b8a2edd4b1693d8e4;hpb=ff479b1f3c77e8312843e7de212253632f4c1a8a;p=rust.git diff --git a/src/etc/pre-push.sh b/src/etc/pre-push.sh index be7de3ebaf5..7a846d44ad6 100755 --- a/src/etc/pre-push.sh +++ b/src/etc/pre-push.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Call `tidy --bless` before git push +# Call `tidy` before git push # Copy this script to .git/hooks to activate, # and remove it from .git/hooks to deactivate. # @@ -10,16 +10,8 @@ set -Eeuo pipefail # https://github.com/rust-lang/rust/issues/77620#issuecomment-705144570 unset GIT_DIR ROOT_DIR="$(git rev-parse --show-toplevel)" -COMMAND="$ROOT_DIR/x.py test tidy" -if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then - COMMAND="python $COMMAND" -elif ! command -v python &> /dev/null; then - COMMAND="python3 $COMMAND" -fi - -echo "Running pre-push script '$COMMAND'" +echo "Running pre-push script $ROOT_DIR/x test tidy" cd "$ROOT_DIR" - -$COMMAND +./x test tidy