@@ -1351,9 +1351,9 @@ impl Config {
1351
1351
config. out = Path :: new (
1352
1352
& env:: var_os ( "CARGO_TARGET_DIR" ) . expect ( "cargo test directly is not supported" ) ,
1353
1353
)
1354
- . parent ( )
1355
- . unwrap ( )
1356
- . to_path_buf ( ) ;
1354
+ . parent ( )
1355
+ . unwrap ( )
1356
+ . to_path_buf ( ) ;
1357
1357
}
1358
1358
1359
1359
config. stage0_metadata = build_helper:: stage0_parser:: parse_stage0_file ( ) ;
@@ -2395,11 +2395,11 @@ impl Config {
2395
2395
println ! ( "WARNING: CI rustc has some fields that are no longer supported in bootstrap; download-rustc will be disabled." ) ;
2396
2396
println ! ( "HELP: Consider rebasing to a newer commit if available." ) ;
2397
2397
return None ;
2398
- } ,
2398
+ }
2399
2399
Err ( e) => {
2400
2400
eprintln ! ( "ERROR: Failed to parse CI rustc config.toml: {e}" ) ;
2401
2401
exit ! ( 2 ) ;
2402
- } ,
2402
+ }
2403
2403
} ;
2404
2404
2405
2405
let current_config_toml = Self :: get_toml ( config_path) . unwrap ( ) ;
@@ -2413,7 +2413,7 @@ impl Config {
2413
2413
2414
2414
let disable_ci_rustc_if_incompatible =
2415
2415
env:: var_os ( "DISABLE_CI_RUSTC_IF_INCOMPATIBLE" )
2416
- . is_some_and ( |s| s == "1" || s == "true" ) ;
2416
+ . is_some_and ( |s| s == "1" || s == "true" ) ;
2417
2417
2418
2418
if disable_ci_rustc_if_incompatible && res. is_err ( ) {
2419
2419
println ! ( "WARNING: download-rustc is disabled with `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` env." ) ;
@@ -2620,7 +2620,7 @@ impl Config {
2620
2620
. args ( [ "symbolic-ref" , "--short" , "HEAD" ] )
2621
2621
. as_command_mut ( ) ,
2622
2622
)
2623
- . map ( |b| b. trim ( ) . to_owned ( ) ) ;
2623
+ . map ( |b| b. trim ( ) . to_owned ( ) ) ;
2624
2624
2625
2625
let mut git = helpers:: git ( Some ( & self . src ) ) . allow_failure ( ) ;
2626
2626
git. run_always ( ) ;
@@ -2689,11 +2689,11 @@ impl Config {
2689
2689
let source_version = semver:: Version :: parse (
2690
2690
fs:: read_to_string ( self . src . join ( "src/version" ) ) . unwrap ( ) . trim ( ) ,
2691
2691
)
2692
- . unwrap ( ) ;
2692
+ . unwrap ( ) ;
2693
2693
if !( source_version == stage0_version
2694
2694
|| ( source_version. major == stage0_version. major
2695
- && ( source_version. minor == stage0_version. minor
2696
- || source_version. minor == stage0_version. minor + 1 ) ) )
2695
+ && ( source_version. minor == stage0_version. minor
2696
+ || source_version. minor == stage0_version. minor + 1 ) ) )
2697
2697
{
2698
2698
let prev_version = format ! ( "{}.{}.x" , source_version. major, source_version. minor - 1 ) ;
2699
2699
fail ( & format ! (
@@ -2845,10 +2845,13 @@ impl Config {
2845
2845
if_unchanged : bool ,
2846
2846
) -> Option < bool > {
2847
2847
let mut git = helpers:: git ( Some ( & self . src ) ) ;
2848
- git. args ( [ "diff-index" , "--quiet" , commit, "--" ] ) ;
2848
+ git. args ( [ "diff-index" , "--quiet" , commit] ) ;
2849
2849
2850
- for dir in dirs {
2851
- git. arg ( self . src . join ( dir) ) ;
2850
+ if !dirs. is_empty ( ) {
2851
+ git. arg ( "--" ) ;
2852
+ for dir in dirs {
2853
+ git. arg ( self . src . join ( dir) ) ;
2854
+ }
2852
2855
}
2853
2856
2854
2857
let has_changes = !t ! ( git. as_command_mut( ) . status( ) ) . success ( ) ;
0 commit comments