Skip to content

Commit df91b40

Browse files
committed
Address review comments
1 parent 59cfb80 commit df91b40

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

CONTRIBUTING.md

+12-6
Original file line numberDiff line numberDiff line change
@@ -203,21 +203,27 @@ They are just regular files and directories. This is in contrast to `submodule`
203203
There are two synchronization directions: `subtree push` and `subtree pull`.
204204

205205
```
206-
git subtree push -P src/tools/clippy https://github.com/rust-lang/rust-clippy.git
206+
git subtree push -P src/tools/clippy git@github.com:your-github-name/rust-clippy rustup
207207
```
208208

209209
takes all the changes that
210210
happened to the copy in this repo and creates commits on the remote repo that match the local
211-
changes (so every local commit that touched the subtree causes a commit on the remote repo).
211+
changes. Every local commit that touched the subtree causes a commit on the remote repo, but is
212+
modified to move the files from the specified directory to the tool repo root.
213+
214+
Make sure to not pick the `master` branch, so you can open a normal PR to the tool to merge that
215+
subrepo push.
212216

213217
```
214-
git subtree pull -P src/tools/clippy https://github.com/rust-lang/rust-clippy.git
218+
git subtree pull -P src/tools/clippy https://github.com/rust-lang/rust-clippy master
215219
```
216220

221+
takes all changes since the last `subtree pull` from the tool repo
222+
repo and adds these commits to the rustc repo + a merge commit that moves the tool changes into
223+
the specified directory in the rust repository.
217224

218-
takes all changes since the last `subtree pull` from the clippy
219-
repo and adds these commits to the rustc repo + a merge commit with the existing changes.
220-
It is recommended that you always do a push before a pull, so that the merge works without conflicts.
225+
It is recommended that you always do a push first and get that merged to the tool master branch.
226+
Then, when you do a pull, the merge works without conflicts.
221227
While definitely possible to resolve conflicts during a pull, you may have to redo the conflict
222228
resolution if your PR doesn't get merged fast enough and there are new conflicts. Do not try to
223229
rebase the result of a `git subtree pull`, rebasing merge commits is a bad idea in general.

0 commit comments

Comments
 (0)