Skip to content

Commit 538a170

Browse files
Update design for PR rust-lang#16198: Update default branch name of rust-lang/rust in subtree sync docs
1 parent 4d6fa3c commit 538a170

File tree

2 files changed

+35
-3
lines changed

2 files changed

+35
-3
lines changed

.exp/design-workflow-9-sync-rustc.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ sequenceDiagram
5252
Note over D: Updates rustup branch in clippy-local (personal fork)
5353
D->>CR: git fetch upstream (rust-lang/rust remote)
5454
D->>CR: git switch rustup
55-
D->>CR: git merge upstream/master --no-ff
55+
D->>CR: git merge upstream/main --no-ff
5656
Note over CR: Merge commit syncs rust changes - allowed exception to no-merge policy
5757
D->>CR: cargo dev sync update_nightly
5858
Note over CR: Updates rust-toolchain.toml channel=nightly-YYYY-MM-DD<br/>and README.md block
@@ -68,13 +68,13 @@ sequenceDiagram
6868
participant RR as rust-lang/rust Repo
6969
participant CR as rust-clippy Repo
7070
Note over D,RR: Ensure in rust-lang/rust repo dir
71-
D->>RR: git switch master (pull latest)
71+
D->>RR: git switch main (pull latest)
7272
D->>RR: git switch -c clippy-subtree-update
7373
D->>RR: git subtree pull -P src/tools/clippy clippy-upstream master
7474
Note over RR: Pulls latest from official clippy master into subtree
7575
D->>RR: git commit changes (if needed)
7676
D->>RR: git push origin clippy-subtree-update
77-
Note over RR: Create and merge PR to rust-lang/rust master
77+
Note over RR: Create and merge PR to rust-lang/rust main
7878
```
7979

8080
## Other High-Level Design Aspects

.exp/pr-analysis-16198.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# PR #16198: Workflow Design Impact Analysis
2+
3+
## Affected Workflows
4+
- 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.
5+
6+
## sync-rustc Analysis
7+
### Summary of design changes
8+
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.
9+
10+
- **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`).
11+
- **Implementation**: Direct string replacements in the markdown documentation file.
12+
- **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.
13+
14+
### Mermaid diagram showing changes to the workflow
15+
```mermaid
16+
flowchart TD
17+
subgraph "Sync from rust-lang/rust to rust-clippy Changes"
18+
OldMerge["Old Step: git merge upstream/master --no-ff<br/>Red: Removal of old ref"] -->|updated to| NewMerge["New Step: git merge upstream/main --no-ff<br/>Green: Addition of new ref"]
19+
style OldMerge fill:#ffcccc,stroke:#ff0000,stroke-width:2px
20+
style NewMerge fill:#ccffcc,stroke:#00aa00,stroke-width:2px
21+
end
22+
subgraph "Sync from clippy to rust-lang/rust Changes"
23+
OldSwitch["Old Step: git switch master (pull latest)<br/>Red: Removal"] -->|changed to| NewSwitch["New Step: git switch main (pull latest)<br/>Green: Addition"]
24+
OldPRNote["Old Note: Create and merge PR to rust-lang/rust master<br/>Red: Removal"] -->|updated| NewPRNote["New Note: Create and merge PR to rust-lang/rust main<br/>Green: Addition"]
25+
style OldSwitch fill:#ffcccc,stroke:#ff0000,stroke-width:2px
26+
style NewSwitch fill:#ccffcc,stroke:#00aa00,stroke-width:2px
27+
style OldPRNote fill:#ffcccc,stroke:#ff0000,stroke-width:2px
28+
style NewPRNote fill:#ccffcc,stroke:#00aa00,stroke-width:2px
29+
end
30+
YellowChange["Yellow: Overall textual changes in branch references throughout diagrams"]:::change
31+
classDef change fill:#ffff99,stroke:#cccc00,stroke-width:2px
32+
```

0 commit comments

Comments
 (0)