diff options
| author | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2025-06-11 02:26:34 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-11 02:26:34 +0800 |
| commit | aa0d277fd79e555f359d9f638b557d869f8d666f (patch) | |
| tree | a1a12b1eed7b1ecf1c2dcb985375ce799091da37 | |
| parent | 4967fd24dec0b178e8766c0d5ce6146d2fd2c152 (diff) | |
| parent | c0978c497db9db168db5c2ce3f341fc336120f71 (diff) | |
| download | rust-aa0d277fd79e555f359d9f638b557d869f8d666f.tar.gz rust-aa0d277fd79e555f359d9f638b557d869f8d666f.zip | |
Merge pull request #2462 from lolbinarycat/patch-2
| -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 `~` |
