about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbinarycat <binarycat@envs.net>2025-01-09 14:22:41 -0600
committerbinarycat <binarycat@envs.net>2025-01-09 14:36:08 -0600
commite1772e723855709d0debd7a4334f03584423f192 (patch)
tree1e157ee815b5265a8dd03e4a33eabfe84b21f27e
parent251206c27b619ccf3a08e2ac4c525dc343f08492 (diff)
downloadrust-e1772e723855709d0debd7a4334f03584423f192.tar.gz
rust-e1772e723855709d0debd7a4334f03584423f192.zip
re-add a warning for old master branch, but with much simpler logic
instead of calling into git or checking the modification time of files,
simply print the warning if there is a very large number of
"modified" files.

also make the wording much softer, so false positives are less alarming.
-rw-r--r--src/bootstrap/src/core/build_steps/format.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/format.rs b/src/bootstrap/src/core/build_steps/format.rs
index f15e0f38e69..95cf55d2fcd 100644
--- a/src/bootstrap/src/core/build_steps/format.rs
+++ b/src/bootstrap/src/core/build_steps/format.rs
@@ -114,6 +114,9 @@ fn print_paths(verb: &str, adjective: Option<&str>, paths: &[String]) {
     } else {
         println!("fmt: {verb} {len} {adjective}files");
     }
+    if len > 1000 {
+        println!("hint: if this number seems too high, try running `git fetch origin master");
+    }
 }
 
 pub fn format(build: &Builder<'_>, check: bool, all: bool, paths: &[PathBuf]) {