@@ -6,8 +6,10 @@ use std::process::exit;
66
77use xshell:: { Shell , cmd} ;
88
9- const JOSH_FILTER : & str = ":rev(2efebd2f0c03dabbe5c3ad7b4ebfbd99238d1fb2 :prefix=src/tools/clippy):/src/tools/clippy" ;
9+ const JOSH_FILTER : & str = ":rev(53d3bc02ed90eba01c5dbc5b2d0c4cabb67ffb4d :prefix=src/tools/clippy):/src/tools/clippy" ;
1010const JOSH_PORT : & str = "42042" ;
11+ const TOOLCHAIN_TOML : & str = "rust-toolchain.toml" ;
12+ const UTILS_README : & str = "clippy_utils/README.md" ;
1113
1214fn start_josh ( ) -> impl Drop {
1315 // Create a wrapper that stops it on drop.
@@ -90,7 +92,6 @@ pub fn rustc_pull() {
9092 const MERGE_COMMIT_MESSAGE : & str = "Merge from rustc" ;
9193
9294 let sh = Shell :: new ( ) . expect ( "failed to create shell" ) ;
93- // sh.change_dir(clippy_project_root());
9495
9596 assert_clean_repo ( & sh) ;
9697
@@ -112,13 +113,16 @@ pub fn rustc_pull() {
112113 ) ;
113114
114115 let mut updater = FileUpdater :: default ( ) ;
115- updater. update_file ( "rust-toolchain.toml" , toolchain_update) ;
116- updater. update_file ( "clippy_utils/README.md" , readme_update) ;
116+ updater. update_file ( TOOLCHAIN_TOML , toolchain_update) ;
117+ updater. update_file ( UTILS_README , readme_update) ;
117118
118119 let message = format ! ( "Bump nightly version -> {date}" ) ;
119- cmd ! ( sh, "git commit rust-toolchain --no-verify -m {message}" )
120- . run ( )
121- . expect ( "FAILED to commit rust-toolchain file, something went wrong" ) ;
120+ cmd ! (
121+ sh,
122+ "git commit --no-verify -m {message} -- {TOOLCHAIN_TOML} {UTILS_README}"
123+ )
124+ . run ( )
125+ . expect ( "FAILED to commit rust-toolchain.toml file, something went wrong" ) ;
122126
123127 let commit = rustc_hash ( ) ;
124128
@@ -167,7 +171,6 @@ pub(crate) const PUSH_PR_DESCRIPTION: &str = "Sync from Clippy commit:";
167171
168172pub fn rustc_push ( rustc_path : String , github_user : & str , branch : & str , force : bool ) {
169173 let sh = Shell :: new ( ) . expect ( "failed to create shell" ) ;
170- // sh.change_dir(clippy_project_root());
171174
172175 assert_clean_repo ( & sh) ;
173176
@@ -207,7 +210,6 @@ pub fn rustc_push(rustc_path: String, github_user: &str, branch: &str, force: bo
207210 let _josh = start_josh ( ) ;
208211
209212 // Do the actual push.
210- // sh.change_dir(clippy_project_root());
211213 println ! ( "Pushing Clippy changes..." ) ;
212214 cmd ! (
213215 sh,
0 commit comments