diff --git a/.exp/design-workflow-9-sync-rustc.md b/.exp/design-workflow-9-sync-rustc.md index 3c0ff51832f4..7c2653db80fc 100644 --- a/.exp/design-workflow-9-sync-rustc.md +++ b/.exp/design-workflow-9-sync-rustc.md @@ -52,7 +52,7 @@ sequenceDiagram Note over D: Updates rustup branch in clippy-local (personal fork) D->>CR: git fetch upstream (rust-lang/rust remote) D->>CR: git switch rustup - D->>CR: git merge upstream/master --no-ff + D->>CR: git merge upstream/main --no-ff Note over CR: Merge commit syncs rust changes - allowed exception to no-merge policy D->>CR: cargo dev sync update_nightly Note over CR: Updates rust-toolchain.toml channel=nightly-YYYY-MM-DD
and README.md block @@ -68,13 +68,13 @@ sequenceDiagram participant RR as rust-lang/rust Repo participant CR as rust-clippy Repo Note over D,RR: Ensure in rust-lang/rust repo dir - D->>RR: git switch master (pull latest) + D->>RR: git switch main (pull latest) D->>RR: git switch -c clippy-subtree-update D->>RR: git subtree pull -P src/tools/clippy clippy-upstream master Note over RR: Pulls latest from official clippy master into subtree D->>RR: git commit changes (if needed) D->>RR: git push origin clippy-subtree-update - Note over RR: Create and merge PR to rust-lang/rust master + Note over RR: Create and merge PR to rust-lang/rust main ``` ## Other High-Level Design Aspects diff --git a/.exp/pr-analysis-16198.md b/.exp/pr-analysis-16198.md new file mode 100644 index 000000000000..af5a6a58ecdd --- /dev/null +++ b/.exp/pr-analysis-16198.md @@ -0,0 +1,32 @@ +# PR #16198: Workflow Design Impact Analysis + +## Affected Workflows +- sync-rustc: The PR modifies `book/src/development/infrastructure/sync.md`, which is a key documentation file for the sync-rustc workflow as listed in `.exp/workflows.json` under relevant_files. The changes update the default branch name references for the `rust-lang/rust` repository from \"master\" to \"main\", directly impacting the documented steps in this workflow's design. + +## sync-rustc Analysis +### Summary of design changes +The PR implements a documentation update in the subtree synchronization guide to reflect the current default branch name (\"main\") of the `rust-lang/rust` repository. This affects specific git commands and instructional text used in the bi-directional sync process between rust-clippy and rust-lang/rust. + +- **Affected aspects**: Git merge command in the sync from rust to clippy (`upstream/master` → `upstream/main`), and checkout instruction in sync from clippy to rust (`master` → `main`). +- **Implementation**: Direct string replacements in the markdown documentation file. +- **Benefits/Implications**: Prevents runtime errors in git operations due to outdated branch names; ensures consistency across project docs. No functional code changes, purely documentary. The design document's Mermaid diagrams have been updated to match via this analysis process. + +### Mermaid diagram showing changes to the workflow +```mermaid +flowchart TD + subgraph "Sync from rust-lang/rust to rust-clippy Changes" + OldMerge["Old Step: git merge upstream/master --no-ff
Red: Removal of old ref"] -->|updated to| NewMerge["New Step: git merge upstream/main --no-ff
Green: Addition of new ref"] + style OldMerge fill:#ffcccc,stroke:#ff0000,stroke-width:2px + style NewMerge fill:#ccffcc,stroke:#00aa00,stroke-width:2px + end + subgraph "Sync from clippy to rust-lang/rust Changes" + OldSwitch["Old Step: git switch master (pull latest)
Red: Removal"] -->|changed to| NewSwitch["New Step: git switch main (pull latest)
Green: Addition"] + OldPRNote["Old Note: Create and merge PR to rust-lang/rust master
Red: Removal"] -->|updated| NewPRNote["New Note: Create and merge PR to rust-lang/rust main
Green: Addition"] + style OldSwitch fill:#ffcccc,stroke:#ff0000,stroke-width:2px + style NewSwitch fill:#ccffcc,stroke:#00aa00,stroke-width:2px + style OldPRNote fill:#ffcccc,stroke:#ff0000,stroke-width:2px + style NewPRNote fill:#ccffcc,stroke:#00aa00,stroke-width:2px + end + YellowChange["Yellow: Overall textual changes in branch references throughout diagrams"]:::change + classDef change fill:#ffff99,stroke:#cccc00,stroke-width:2px +```