You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-19Lines changed: 1 addition & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -74,22 +74,4 @@ including the `<!-- toc -->` marker at the place where you want the TOC.
74
74
75
75
This repository is linked to `rust-lang/rust` as a [josh](https://josh-project.github.io/josh/intro.html) subtree. You can use the [rustc-josh-sync](https://github.com/rust-lang/josh-sync) tool to perform synchronization.
76
76
77
-
You can install the tool using `cargo install --locked --git https://github.com/rust-lang/josh-sync`.
78
-
79
-
### Pull changes from `rust-lang/rust` into this repository
80
-
81
-
1) Checkout a new branch that will be used to create a PR into `rust-lang/rustc-dev-guide`
82
-
2) Run the pull command
83
-
```
84
-
rustc-josh-sync pull
85
-
```
86
-
3) Push the branch to your fork and create a PR into `rustc-dev-guide`
87
-
- If you have `gh` CLI installed, `rustc-josh-sync` can create the PR for you.
88
-
89
-
### Push changes from this repository into `rust-lang/rust`
90
-
91
-
1) Run the push command to create a branch named `<branch-name>` in a `rustc` fork under the `<gh-username>` account
92
-
```
93
-
rustc-josh-sync push <branch-name> <gh-username>
94
-
```
95
-
2) Create a PR from `<branch-name>` into `rust-lang/rust`
77
+
You can find a guide on how to perform the synchronization [here](./src/external-repos.md#synchronizing-a-josh-subtree).
The [josh] tool is an alternative to git subtrees, which manages git history in a different way and scales better to larger repositories. Specific tooling is required to work with josh, you can check out the `miri` or `rust-analyzer` scripts linked above for inspiration. If you want to migrate a repository dependency from `git subtree` or `git submodule` to josh, you can check out [this guide](https://hackmd.io/7pOuxnkdQDaL1Y1FQr65xg).
50
+
### Josh subtrees
47
51
48
-
Below you can find a guide on how to perform push and pull synchronization with the main rustc repo using `git subtree`, although these instructions might differ repo from repo.
52
+
The [josh] tool is an alternative to git subtrees, which manages git history in a different way and scales better to larger repositories. Specific tooling is required to work with josh, you can check out the `miri` or `rust-analyzer` scripts linked above for inspiration. We provide a helper [`rustc-josh-sync`][josh-sync] tool to help with the synchronization, it is described [below](#synchronizing-a-josh-subtree).
49
53
50
-
### Synchronizing a subtree
54
+
### Synchronizing a Josh subtree
55
+
56
+
We use a dedicated tool called [`rustc-josh-sync`][josh-sync] for performing Josh subtree updates.
57
+
Currently, we are migrating Josh repositories to it. So far, it is used in:
58
+
59
+
- rustc-dev-guide
60
+
61
+
To use the tool, first install it with `cargo install --locked --git https://github.
62
+
com/rust-lang/josh-sync`.
63
+
64
+
Both pulls (synchronize changes from rust-lang/rust into the subtree) and pushes (synchronize
65
+
changes from the subtree to rust-lang/rust) are performed from the subtree repository (so first
66
+
switch to its repository checkout directory in your terminal).
67
+
68
+
#### Performing pull
69
+
1) Checkout a new branch that will be used to create a PR into the subtree
70
+
2) Run the pull command
71
+
```
72
+
rustc-josh-sync pull
73
+
```
74
+
3) Push the branch to your fork and create a PR into the subtree repository
75
+
- If you have `gh` CLI installed, `rustc-josh-sync` can create the PR for you.
76
+
77
+
#### Performing push
78
+
79
+
1) Run the push command to create a branch named `<branch-name>` in a `rustc` fork under the `<gh-username>` account
80
+
```
81
+
rustc-josh-sync push <branch-name> <gh-username>
82
+
```
83
+
2) Create a PR from `<branch-name>` into `rust-lang/rust`
84
+
85
+
### Creating a new Josh subtree dependency
86
+
87
+
If you want to migrate a repository dependency from `git subtree` or `git submodule` to josh, you can check out [this guide](https://hackmd.io/7pOuxnkdQDaL1Y1FQr65xg).
88
+
89
+
### Synchronizing a git subtree
51
90
52
91
Periodically the changes made to subtree based dependencies need to be synchronized between this
53
92
repository and the upstream tool repositories.
@@ -129,3 +168,4 @@ the week leading up to the beta cut.
0 commit comments