diff options
| author | lolbinarycat <binarycat@envs.net> | 2025-06-10 12:48:05 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-10 12:48:05 -0500 |
| commit | c0978c497db9db168db5c2ce3f341fc336120f71 (patch) | |
| tree | a1a12b1eed7b1ecf1c2dcb985375ce799091da37 /src/doc/rustc-dev-guide | |
| parent | 4967fd24dec0b178e8766c0d5ce6146d2fd2c152 (diff) | |
| download | rust-c0978c497db9db168db5c2ce3f341fc336120f71.tar.gz rust-c0978c497db9db168db5c2ce3f341fc336120f71.zip | |
Using git § I changed a submodule by accident: be explicit
Rewriting git history is something that is often difficult for new contributors, and we're already explaining the `<foo>` placeholder syntax, so I think it makes sense to be explicit about what exactly the paths mean.
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/git.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/doc/rustc-dev-guide/src/git.md b/src/doc/rustc-dev-guide/src/git.md index 8118ddff10c..8726ddfce20 100644 --- a/src/doc/rustc-dev-guide/src/git.md +++ b/src/doc/rustc-dev-guide/src/git.md @@ -142,7 +142,8 @@ The most common cause is that you rebased after a change and ran `git add .` wit `x` to update the submodules. Alternatively, you might have run `cargo fmt` instead of `x fmt` and modified files in a submodule, then committed the changes. -To fix it, do the following things: +To fix it, do the following things (if you changed a submodule other than cargo, +replace `src/tools/cargo` with the path to that submodule): 1. See which commit has the accidental changes: `git log --stat -n1 src/tools/cargo` 2. Revert the changes to that commit: `git checkout <my-commit>~ src/tools/cargo`. Type `~` |
