@@ -2445,14 +2445,6 @@ impl Config {
24452445 }
24462446 } ;
24472447
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-
24562448 // Look for a version to compare to based on the current commit.
24572449 // Only commits merged by bors will have CI artifacts.
24582450 let merge_base = output (
@@ -2473,7 +2465,9 @@ impl Config {
24732465
24742466 // Warn if there were changes to the compiler or standard library since the ancestor commit.
24752467 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" ) ] )
24772471 . command
24782472 . status( ) )
24792473 . success ( ) ;
@@ -2545,12 +2539,6 @@ impl Config {
25452539 option_name : & str ,
25462540 if_unchanged : bool ,
25472541 ) -> 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-
25542542 // Look for a version to compare to based on the current commit.
25552543 // Only commits merged by bors will have CI artifacts.
25562544 let merge_base = output (
@@ -2573,6 +2561,9 @@ impl Config {
25732561 let mut git = helpers:: git ( Some ( & self . src ) ) ;
25742562 git. args ( [ "diff-index" , "--quiet" , commit, "--" ] ) ;
25752563
2564+ // Handle running from a directory other than the top level
2565+ let top_level = self . src . to_str ( ) . unwrap ( ) ;
2566+
25762567 for path in modified_paths {
25772568 git. arg ( format ! ( "{top_level}/{path}" ) ) ;
25782569 }
0 commit comments