about summary refs log tree commit diff
path: root/src/etc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-04-12 10:25:49 +0000
committerbors <bors@rust-lang.org>2022-04-12 10:25:49 +0000
commit2a83fbc42a9bb6bfdb8d3fb4ecce83fb410d7642 (patch)
treeadcd3859bc718dc7522e7ea8800ca338c43da86b /src/etc
parent4e1927db3c399fa34dc71992bd5dbec09f945c3d (diff)
parentc3d6082e9b53f9c43f46a72af1b957b0cc0b2bf7 (diff)
downloadrust-2a83fbc42a9bb6bfdb8d3fb4ecce83fb410d7642.tar.gz
rust-2a83fbc42a9bb6bfdb8d3fb4ecce83fb410d7642.zip
Auto merge of #95966 - matthiaskrgr:rollup-hhy4nod, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #95320 (Document the current MIR semantics that are clear from existing code)
 - #95722 (pre-push.sh: Use python3 if python is not found)
 - #95881 (Use `to_string` instead of `format!`)
 - #95909 (rustdoc: Reduce allocations in a `theme` function)
 - #95910 (Fix crate_type attribute to not warn on duplicates)
 - #95920 (use `Span::find_ancestor_inside` to get right span in CastCheck)
 - #95936 (Fix a bad error message for `relative paths are not supported in visibilities` error)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/etc')
-rwxr-xr-xsrc/etc/pre-push.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/etc/pre-push.sh b/src/etc/pre-push.sh
index a78725f2ab0..5f5b48bc1c0 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 each commit
+# Call `tidy --bless` before git push
 # Copy this script to .git/hooks to activate,
 # and remove it from .git/hooks to deactivate.
 #
@@ -14,6 +14,8 @@ COMMAND="$ROOT_DIR/x.py test tidy --bless"
 
 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'"