rustfmt subtree sync procedurerustfmt is using Josh to perform subtree synces with the rust-lang/rust repository.
The josh-sync tool is used as a wrapper on top of Josh to help automate the subtree sync process (both pulls and pushes). You can install it with cargo install --git https://github.com/rust-lang/josh-sync.
rust-lang/rust to rustfmtrustfmt checkoutmain branch from upstreamrustc-josh-sync pullrustc-josh-sync, or create a PR to rust-lang/rustfmt repository[!CAUTION]
For now, do not use the
--allow-noopoption ofrustc-josh-sync. See https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Nightly.20sync.20mode.20of.20josh-sync.20issue/with/633238190.
The rustfmt maintainers will run Diff Check against the PR to catch any unexpected formatting changes.
Once Diff Check failures are investigated and are resolved, the PR can then be merged.
Where applicable, we may need to update the CHANGELOG entries with merged PRs (both in rustfmt repository and also in the rust-lang/rust rustfmt subtree that was included in the subtree-push merge), and then bump rustfmt version number.
rustfmt to rust-lang/rustrustfmt checkoutmain branch from upstreamrustc-josh-sync push <branch-name> <github-username><github-username>/rust fork of rust-lang/rust.rustc-josh-sync to open a PR to rust-lang/rust, or create the PR manually.Make sure to minimize the time between a pull and a subsequent push to avoid unnecessary complications.