Skip to content

Commit 0f95f26

Browse files

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/git.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -239,17 +239,19 @@ no changes added to commit (use "git add" and/or "git commit -a")
239239
```
240240

241241
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,
242+
this [later](#git-submodules)). To get rid of those, run `./x.py --help`, which will automatically update the submodules.
243+
244+
Some submodules are not actually needed; for example, `src/llvm-project` doesn't need to be checked out if you're using `download-ci-llvm`.
245+
To avoid having to keep fetching its history, you can use `git submodule deinit -f src/llvm-project`, which will also avoid it showing as modified again.
246+
247+
Note that, as of <!-- date-check --> Aug 2022,
246248
there is a [bug][#77620] if you use worktrees,
247249
submodules, and `x.py` in a commit hook.
248250
If you run into an error like the following,
249251
it's not anything you did wrong:
250252

251253
```
252-
error: failed to read `/home/joshua/rustc-worktree/src/tools/miri/cargo-miri/Cargo.toml`
254+
error: failed to read `/home/jyn/rustc-worktree/src/tools/cargo/Cargo.toml`
253255
254256
Caused by:
255257
No such file or directory (os error 2)
@@ -260,8 +262,6 @@ There is a workaround in [the issue][#77620-workaround].
260262
[#77620]: https://github.com/rust-lang/rust/issues/77620
261263
[#77620-workaround]: https://github.com/rust-lang/rust/issues/77620#issuecomment-705228229
262264

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

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

0 commit comments

Comments
 (0)