Skip to content

Commit 0b90a1e

Browse files
authored
Merge pull request #1017 from GuillaumeGomez/josh-doc
Add tips to simplify josh sync command
2 parents 3b56c9a + 42dca02 commit 0b90a1e

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

‎doc/subtree.md‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,32 @@ The procedure for performing subtree synchronizations is documented [here][rdg-j
1111
## Pushing changes to `rust-lang/rust`
1212

1313
If the used GCC commit (recorded in `libgccjit.version`) changed in `rustc_codegen_gcc`, then you will have to update the `gcc` submodule in the `rust-lang/rust` repository in the push sync PR. The CI in `rust-lang/rust` should ensure that these two commit references match. You can simply update the `gcc` submodule commit and push it to your push sync PR once it has been created.
14+
15+
## Environment variables to make things easier
16+
17+
To avoid passing through github `https` interface, create a file named `josh.gitconfig` (for example at `$HOME/.config/git/josh.gitconfig`) which contains:
18+
19+
```gitconfig
20+
[url "git@github.com:"]
21+
insteadOf = "https://github.com/"
22+
23+
[include]
24+
path = ~/.gitconfig
25+
path = ~/.config/git/config
26+
```
27+
28+
Then refer to it using the `GIT_CONFIG_GLOBAL` environment variable.
29+
30+
And to prevent cloning the rust repository every time, set the `RUSTC_GIT` environment variable to point to your local copy of the `rust` repository. The path needs to be absolute!
31+
32+
Then running the command looks like:
33+
34+
```bash
35+
GIT_CONFIG_GLOBAL=$HOME/.config/git/josh.gitconfig RUSTC_GIT=/my/local/rust-fork rustc-josh-sync push <branch name> <rust fork owner>
36+
```
37+
38+
So if your github account name is "tadam" and you want to push to a branch named "cg_gcc-subtree-sync", the command will be:
39+
40+
```bash
41+
GIT_CONFIG_GLOBAL=$HOME/.config/git/josh.gitconfig RUSTC_GIT=/my/local/rust-fork rustc-josh-sync push cg_gcc-subtree-sync tadam
42+
```

0 commit comments

Comments
 (0)