diff options
| author | jyn <github@jyn.dev> | 2025-08-26 13:06:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-26 13:06:03 -0400 |
| commit | 3603ed3fd1035d6d23c6951e2ef32ab89446cff7 (patch) | |
| tree | f6d222f4ace5b2bc98bf3932d74a91876f2ea1d4 /src/doc/rustc-dev-guide | |
| parent | 731595c81377ed01f96271d4e713fc5f2d66569c (diff) | |
| parent | 65f1a9f26747f3a573c1b1a4f4eea4a412f0ffdc (diff) | |
| download | rust-3603ed3fd1035d6d23c6951e2ef32ab89446cff7.tar.gz rust-3603ed3fd1035d6d23c6951e2ef32ab89446cff7.zip | |
Merge pull request #2554 from ali90h/clarify-keep-branch-up-to-date
contributing: clarify when to update a branch vs avoid during review
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/contributing.md | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/doc/rustc-dev-guide/src/contributing.md b/src/doc/rustc-dev-guide/src/contributing.md index 963bef3af8d..d0a32f71a3d 100644 --- a/src/doc/rustc-dev-guide/src/contributing.md +++ b/src/doc/rustc-dev-guide/src/contributing.md @@ -154,11 +154,9 @@ The CI in rust-lang/rust applies your patches directly against the current maste not against the commit your branch is based on. This can lead to unexpected failures if your branch is outdated, even when there are no explicit merge conflicts. -Before submitting or updating a PR, make sure to update your branch -as mentioned [here](git.md#keeping-things-up-to-date) if it's significantly -behind the master branch (e.g., more than 100 commits behind). -This fetches the latest master branch and rebases your changes on top of it, -ensuring your PR is tested against the latest code. +Update your branch only when needed: when you have merge conflicts, upstream CI is broken and blocking your green PR, or a maintainer requests it. Avoid updating an already-green PR under review unless necessary. During review, make incremental commits to address feedback. Prefer to squash or rebase only at the end, or when a reviewer requests it. + +When updating, use `git push --force-with-lease` and leave a brief comment explaining what changed. Some repos prefer merging from `upstream/master` instead of rebasing; follow the project's conventions. See [keeping things up to date](git.md#keeping-things-up-to-date) for detailed instructions. After rebasing, it's recommended to [run the relevant tests locally](tests/intro.md) to catch any issues before CI runs. |
