Skip to content

"Keeping your branch up-to-date" might be insufficiently nuanced #2542

@jieyouxu

Description

@jieyouxu

Currently, this section (https://rustc-dev-guide.rust-lang.org/contributing.html#keeping-your-branch-up-to-date) says

Keeping your branch up-to-date

The CI in rust-lang/rust applies your patches directly against the current master, 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 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.

After rebasing, it's recommended to run the relevant tests locally to catch any issues before CI runs.

This is not necessarily a universally good advice, because rebase + force-push on review when not necessary makes it more annoying to review (the reviewer would have to locally range-diff if even viable), and is at the same time more work for PR author. At the same time, it is good advice when rebase against latest master is necessary.

I'm not sure how to word it to convey this nuance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions