@@ -2445,14 +2445,6 @@ impl Config {
2445
2445
}
2446
2446
} ;
2447
2447
2448
- // Handle running from a directory other than the top level
2449
- let top_level = output (
2450
- & mut helpers:: git ( Some ( & self . src ) ) . args ( [ "rev-parse" , "--show-toplevel" ] ) . command ,
2451
- ) ;
2452
- let top_level = top_level. trim_end ( ) ;
2453
- let compiler = format ! ( "{top_level}/compiler/" ) ;
2454
- let library = format ! ( "{top_level}/library/" ) ;
2455
-
2456
2448
// Look for a version to compare to based on the current commit.
2457
2449
// Only commits merged by bors will have CI artifacts.
2458
2450
let merge_base = output (
@@ -2473,7 +2465,9 @@ impl Config {
2473
2465
2474
2466
// Warn if there were changes to the compiler or standard library since the ancestor commit.
2475
2467
let has_changes = !t ! ( helpers:: git( Some ( & self . src) )
2476
- . args( [ "diff-index" , "--quiet" , commit, "--" , & compiler, & library] )
2468
+ . args( [ "diff-index" , "--quiet" , commit] )
2469
+ . arg( "--" )
2470
+ . args( [ self . src. join( "compiler" ) , self . src. join( "library" ) ] )
2477
2471
. command
2478
2472
. status( ) )
2479
2473
. success ( ) ;
@@ -2545,12 +2539,6 @@ impl Config {
2545
2539
option_name : & str ,
2546
2540
if_unchanged : bool ,
2547
2541
) -> Option < String > {
2548
- // Handle running from a directory other than the top level
2549
- let top_level = output (
2550
- & mut helpers:: git ( Some ( & self . src ) ) . args ( [ "rev-parse" , "--show-toplevel" ] ) . command ,
2551
- ) ;
2552
- let top_level = top_level. trim_end ( ) ;
2553
-
2554
2542
// Look for a version to compare to based on the current commit.
2555
2543
// Only commits merged by bors will have CI artifacts.
2556
2544
let merge_base = output (
@@ -2573,8 +2561,11 @@ impl Config {
2573
2561
let mut git = helpers:: git ( Some ( & self . src ) ) ;
2574
2562
git. args ( [ "diff-index" , "--quiet" , commit, "--" ] ) ;
2575
2563
2564
+ // Handle running from a directory other than the top level
2565
+ let top_level = & self . src ;
2566
+
2576
2567
for path in modified_paths {
2577
- git. arg ( format ! ( "{ top_level}/{ path}" ) ) ;
2568
+ git. arg ( top_level. join ( path) ) ;
2578
2569
}
2579
2570
2580
2571
let has_changes = !t ! ( git. command. status( ) ) . success ( ) ;
0 commit comments