@@ -2466,14 +2466,6 @@ impl Config {
2466
2466
}
2467
2467
} ;
2468
2468
2469
- // Handle running from a directory other than the top level
2470
- let top_level = output (
2471
- & mut helpers:: git ( Some ( & self . src ) ) . args ( [ "rev-parse" , "--show-toplevel" ] ) . command ,
2472
- ) ;
2473
- let top_level = top_level. trim_end ( ) ;
2474
- let compiler = format ! ( "{top_level}/compiler/" ) ;
2475
- let library = format ! ( "{top_level}/library/" ) ;
2476
-
2477
2469
// Look for a version to compare to based on the current commit.
2478
2470
// Only commits merged by bors will have CI artifacts.
2479
2471
let merge_base = output (
@@ -2494,7 +2486,9 @@ impl Config {
2494
2486
2495
2487
// Warn if there were changes to the compiler or standard library since the ancestor commit.
2496
2488
let has_changes = !t ! ( helpers:: git( Some ( & self . src) )
2497
- . args( [ "diff-index" , "--quiet" , commit, "--" , & compiler, & library] )
2489
+ . args( [ "diff-index" , "--quiet" , commit] )
2490
+ . arg( "--" )
2491
+ . args( [ self . src. join( "compiler" ) , self . src. join( "library" ) ] )
2498
2492
. command
2499
2493
. status( ) )
2500
2494
. success ( ) ;
@@ -2566,12 +2560,6 @@ impl Config {
2566
2560
option_name : & str ,
2567
2561
if_unchanged : bool ,
2568
2562
) -> Option < String > {
2569
- // Handle running from a directory other than the top level
2570
- let top_level = output (
2571
- & mut helpers:: git ( Some ( & self . src ) ) . args ( [ "rev-parse" , "--show-toplevel" ] ) . command ,
2572
- ) ;
2573
- let top_level = top_level. trim_end ( ) ;
2574
-
2575
2563
// Look for a version to compare to based on the current commit.
2576
2564
// Only commits merged by bors will have CI artifacts.
2577
2565
let merge_base = output (
@@ -2594,8 +2582,11 @@ impl Config {
2594
2582
let mut git = helpers:: git ( Some ( & self . src ) ) ;
2595
2583
git. args ( [ "diff-index" , "--quiet" , commit, "--" ] ) ;
2596
2584
2585
+ // Handle running from a directory other than the top level
2586
+ let top_level = & self . src ;
2587
+
2597
2588
for path in modified_paths {
2598
- git. arg ( format ! ( "{ top_level}/{ path}" ) ) ;
2589
+ git. arg ( top_level. join ( path) ) ;
2599
2590
}
2600
2591
2601
2592
let has_changes = !t ! ( git. command. status( ) ) . success ( ) ;
0 commit comments