Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add git-subtree instructions #2560

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,46 @@ see <https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html>.

With this, you should now have a working development setup! See
[above](#building-and-testing-miri) for how to proceed working on Miri.

### Syncing the miri subtree

Note: Never rebase a subtree sync (in either direction). Always redo the operation.

#### Updating from the rustc repo

One time setup:

Add your own miri fork as `miri-your-fork` to the rustc repo:

```
git remote add miri-your-fork git@github.com:your-name/miri.git
```

Every time:

```
ulimit -Ss 1000000
wget https://raw.githubusercontent.com/gitgitgadget/git/fe2e4819b869725f870cd3ce99f1f8150fe17dc1/contrib/subtree/git-subtree.sh
sh git-subtree.sh push --prefix src/tools/miri/ miri-your-fork miri-subtree-sync
rm git-subtree.sh
```
oli-obk marked this conversation as resolved.
Show resolved Hide resolved


#### Updating the rustc fork from the miri repo
Copy link
Member

@RalfJung RalfJung Sep 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the rustc → miri or miri → rustc direction? I cannot tell, "from" could mean either (take the update from the miri repo, or being in the miri repo and doing an update from there)... so please clearly state "miri to rustc" or "rustc to miri" and which repo's checkout the commands should be executed in.


One time setup:

Add the miri repo as `miri` to the rustc repo:

```
git remote add miri https://github.com/rust-lang/miri.git
```

Every time:

```
ulimit -Ss 1000000
wget https://raw.githubusercontent.com/gitgitgadget/git/fe2e4819b869725f870cd3ce99f1f8150fe17dc1/contrib/subtree/git-subtree.sh
sh git-subtree.sh pull --prefix src/tools/miri/ miri master
rm git-subtree.sh
```
RalfJung marked this conversation as resolved.
Show resolved Hide resolved
oli-obk marked this conversation as resolved.
Show resolved Hide resolved