Skip to content

Commit

Permalink
re-add a warning for old master branch, but with much simpler logic
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lolbinarycat committed Jan 9, 2025
1 parent 251206c commit e1772e7
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 {
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 e1772e7

Please sign in to comment.