diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2020-04-02 17:20:56 +0200 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2020-04-02 17:20:56 +0200 |
| commit | df91b40b43e6fb631f09a36d0d305585822eeb74 (patch) | |
| tree | 9f5e73f6520236f1c69aded39b109002209c9b0a /CONTRIBUTING.md | |
| parent | 59cfb8035c387bcf7297c08b78dd099dec2dd7f4 (diff) | |
| download | rust-df91b40b43e6fb631f09a36d0d305585822eeb74.tar.gz rust-df91b40b43e6fb631f09a36d0d305585822eeb74.zip | |
Address review comments
Diffstat (limited to 'CONTRIBUTING.md')
| -rw-r--r-- | CONTRIBUTING.md | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 486129ac4fa..fee16a1764d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -203,21 +203,27 @@ They are just regular files and directories. This is in contrast to `submodule` There are two synchronization directions: `subtree push` and `subtree pull`. ``` -git subtree push -P src/tools/clippy https://github.com/rust-lang/rust-clippy.git +git subtree push -P src/tools/clippy git@github.com:your-github-name/rust-clippy rustup ``` takes all the changes that happened to the copy in this repo and creates commits on the remote repo that match the local -changes (so every local commit that touched the subtree causes a commit on the remote repo). +changes. Every local commit that touched the subtree causes a commit on the remote repo, but is +modified to move the files from the specified directory to the tool repo root. + +Make sure to not pick the `master` branch, so you can open a normal PR to the tool to merge that +subrepo push. ``` -git subtree pull -P src/tools/clippy https://github.com/rust-lang/rust-clippy.git +git subtree pull -P src/tools/clippy https://github.com/rust-lang/rust-clippy master ``` +takes all changes since the last `subtree pull` from the tool repo +repo and adds these commits to the rustc repo + a merge commit that moves the tool changes into +the specified directory in the rust repository. -takes all changes since the last `subtree pull` from the clippy -repo and adds these commits to the rustc repo + a merge commit with the existing changes. -It is recommended that you always do a push before a pull, so that the merge works without conflicts. +It is recommended that you always do a push first and get that merged to the tool master branch. +Then, when you do a pull, the merge works without conflicts. While definitely possible to resolve conflicts during a pull, you may have to redo the conflict resolution if your PR doesn't get merged fast enough and there are new conflicts. Do not try to rebase the result of a `git subtree pull`, rebasing merge commits is a bad idea in general. |
