@@ -172,32 +172,34 @@ differently from other crates that are directly in this repo:
172
172
* [ Clippy] ( https://github.com/rust-lang/rust-clippy )
173
173
* [ rustfmt] ( https://github.com/rust-lang/rustfmt )
174
174
175
- They are just regular files and directories. This is in contrast to ` submodule ` dependencies
176
- (see below for those). Only tool authors will actually use any operations here.
175
+ In contrast to ` submodule ` dependencies
176
+ (see below for those), the ` subtree ` dependencies are just regular files and directories which can
177
+ be updated in tree. However, enhancements, bug fixes, etc. specific to these tools should be filed
178
+ against the tools directly in their respective upstream repositories.
177
179
178
180
#### Synchronizing a subtree
179
181
180
- There are two synchronization directions: ` subtree push ` and ` subtree pull ` .
182
+ Periodically the changes made to subtree based dependencies need to be synchronized between this
183
+ repository and the upstream tool repositories.
181
184
182
- ```
183
- git subtree push -P src/tools/clippy [email protected] :your-github-name/rust-clippy sync-from-rust
184
- ```
185
-
186
- takes all the changes that
187
- happened to the copy in this repo and creates commits on the remote repo that match the local
188
- changes. Every local commit that touched the subtree causes a commit on the remote repo, but is
189
- modified to move the files from the specified directory to the tool repo root.
185
+ Subtree synchronizations are typically handled by the respective tool maintainers. Other users
186
+ are welcome to submit synchronization PRs, however, in order to do so you you will need to modify
187
+ your local git installation and follow a very precise set of instructions.
188
+ These instructions are documented, along with several useful tips and tricks, in the
189
+ [ syncing subtree changes] [ clippy-sync-docs ] section in Clippy's Contributing guide.
190
+ The instructions are applicable for use with any subtree based tool, just be sure to
191
+ use the correct corresponding subtree directory and remote repository.
190
192
191
- Make sure to not pick the ` master ` branch on the tool repo, so you can open a normal PR to the tool
192
- to merge that subrepo push.
193
+ The synchronization process goes in two directions: ` subtree push ` and ` subtree pull ` .
193
194
194
- ```
195
- git subtree pull -P src/tools/clippy https://github.com/rust-lang/rust-clippy master
196
- ```
195
+ A ` subtree push ` takes all the changes that happened to the copy in this repo and creates commits
196
+ on the remote repo that match the local changes. Every local
197
+ commit that touched the subtree causes a commit on the remote repo, but
198
+ is modified to move the files from the specified directory to the tool repo root.
197
199
198
- takes all changes since the last ` subtree pull ` from the tool repo
199
- and adds these commits to the rustc repo + a merge commit that moves the tool changes into
200
- the specified directory in the rust repository.
200
+ A ` subtree pull ` takes all changes since the last ` subtree pull `
201
+ from the tool repo and adds these commits to the rustc repo along with a merge commit that moves
202
+ the tool changes into the specified directory in the rust repository.
201
203
202
204
It is recommended that you always do a push first and get that merged to the tool master branch.
203
205
Then, when you do a pull, the merge works without conflicts.
@@ -212,6 +214,8 @@ Luckily you can just abort this without any consequences by throwing away either
212
214
in rustc or the pushed branch on the remote and try again. It is usually fairly obvious
213
215
that this is happening because you suddenly get thousands of commits that want to be synchronized.
214
216
217
+ [ clippy-sync-docs ] : https://github.com/rust-lang/rust-clippy/blob/master/CONTRIBUTING.md#syncing-changes-between-clippy-and-rust-langrust
218
+
215
219
#### Creating a new subtree dependency
216
220
217
221
If you want to create a new subtree dependency from an existing repository, call (from this
0 commit comments