Skip to content

Commit bfa6dfe

Browse files

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/git.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -238,18 +238,22 @@ Changes not staged for commit:
238238
no changes added to commit (use "git add" and/or "git commit -a")
239239
```
240240

241-
These changes are not changes to files: they are changes to submodules (more on
242-
this [later](#git-submodules)). To get rid of those, run `git submodule update`
243-
(or run any `x.py` command, which will automatically update the submodules).
244-
Note that,
245-
as of <!-- date-check --> Aug 2022,
241+
These changes are not changes to files: they are changes to submodules (more on this
242+
[later](#git-submodules)). To get rid of those, run `./x.py --help`, which will automatically update
243+
the submodules.
244+
245+
Some submodules are not actually needed; for example, `src/llvm-project` doesn't need to be checked
246+
out if you're using `download-ci-llvm`. To avoid having to keep fetching its history, you can use
247+
`git submodule deinit -f src/llvm-project`, which will also avoid it showing as modified again.
248+
249+
Note that, as of <!-- date-check --> Aug 2022,
246250
there is a [bug][#77620] if you use worktrees,
247251
submodules, and `x.py` in a commit hook.
248252
If you run into an error like the following,
249253
it's not anything you did wrong:
250254

251255
```
252-
error: failed to read `/home/joshua/rustc-worktree/src/tools/miri/cargo-miri/Cargo.toml`
256+
error: failed to read `/home/jyn/rustc-worktree/src/tools/cargo/Cargo.toml`
253257
254258
Caused by:
255259
No such file or directory (os error 2)
@@ -260,8 +264,6 @@ There is a workaround in [the issue][#77620-workaround].
260264
[#77620]: https://github.com/rust-lang/rust/issues/77620
261265
[#77620-workaround]: https://github.com/rust-lang/rust/issues/77620#issuecomment-705228229
262266

263-
(Note that as of Sept 2022 `miri` is a subtree and not a submodule.)
264-
265267
## Rebasing and Conflicts
266268

267269
When you edit your code locally, you are making changes to the version of

0 commit comments

Comments
 (0)