]> git.lizzy.rs Git - rust.git/blob - src/etc/pre-push.sh
Auto merge of #107443 - cjgillot:generator-less-query, r=compiler-errors
[rust.git] / src / etc / pre-push.sh
1 #!/usr/bin/env bash
2 #
3 # Call `tidy` before git push
4 # Copy this script to .git/hooks to activate,
5 # and remove it from .git/hooks to deactivate.
6 #
7
8 set -Eeuo pipefail
9
10 # https://github.com/rust-lang/rust/issues/77620#issuecomment-705144570
11 unset GIT_DIR
12 ROOT_DIR="$(git rev-parse --show-toplevel)"
13
14 echo "Running pre-push script $ROOT_DIR/x test tidy"
15
16 cd "$ROOT_DIR"
17 CARGOFLAGS="--locked" ./x test tidy