Skip to content

Commit 8763adb

Browse files
pnkfelixcamelid
authored andcommitted
git.md: Expanded a note to try to stress what you need to do if you're playing
games with submodules. (I overlooked this when cherry-picking an LLVM commit today, and wasted some time wondering why I wasn't seeing any effect in my resulting `rustc` build...)
1 parent 341abec commit 8763adb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/git.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,13 @@ This is because, like any dependency, we want to be able to control which versio
415415
Submodules allow us to do just that: every submodule is "pinned" to a certain
416416
commit, which doesn't change unless modified manually. If you use `git checkout <commit>`
417417
in the `miri` directory and go back to the `rust` directory, you can stage this
418-
change like any other. This is usually done by the maintainers of the
419-
project, and looks like [this][miri-update].
418+
change like any other, e.g. by running `git add src/tools/miri`. (Note that if
419+
you *don't* stage the change to commit, then you run the risk that running
420+
`x.py` will just undo your change by switching back to the previous commit when
421+
it automatically "updates" the submodules.)
422+
423+
This version selection is usually done by the maintainers of the project, and
424+
looks like [this][miri-update].
420425

421426
Git submodules take some time to get used to, so don't worry if it isn't perfectly
422427
clear yet. You will rarely have to use them directly and, again, you don't need

0 commit comments

Comments
 (0)