Skip to content

Commit

Permalink
Rollup merge of #135301 - lolbinarycat:bootstrap-old-master-resurecte…
Browse files Browse the repository at this point in the history
…d, r=onur-ozkan

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.

(warning was removed in #134935)
  • Loading branch information
jhpratt authored Jan 11, 2025
2 parents 351e618 + 60cbd74 commit 8c3e9d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bootstrap/src/core/build_steps/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ fn print_paths(verb: &str, adjective: Option<&str>, paths: &[String]) {
} else {
println!("fmt: {verb} {len} {adjective}files");
}
if len > 1000 && !CiEnv::is_ci() {
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]) {
Expand Down

0 comments on commit 8c3e9d7

Please sign in to comment.