Skip to content

Conversation

samueltardieu
Copy link
Member

This feature shows the changes when a PR is rebased, while the GitHub UI would mix the actual changes with the ones coming from the rebase.

changelog: none

r? @flip1995

This [feature](https://forge.rust-lang.org/triagebot/range-diff.html)
shows the changes when a PR is rebased, while the GitHub UI would mix
the actual changes with the ones coming from the rebase.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 22, 2025
@flip1995
Copy link
Member

Do you have an example from another repo how this looks like. This sounds like it could get quite spammy for people that use a rebase workflow.

@samueltardieu
Copy link
Member Author

samueltardieu commented Aug 23, 2025

The compiler uses it. For example, this comment gives a link which shows that only a one-line change occurred during the rebase, while GitHub's provided "Compare" (just above the comment I linked) shows all the changes that happened between both bases as well.

For me, not having a range-diff when reviewing patches make the process a bit more complicated. For example, one of our most active contributors tends to react to reviews by adding new commits, which is fine. When I ask them to squash them when it's time to merge, they also tend to rebase the squashed commits onto the current master at the same time. As a consequence, I have to check manually every time that no changes other than squashing and rebasing occurred, while using the range-diff would show no change at all apart from rebasing, and would not require me to ask the contributor to change their process either.

@flip1995
Copy link
Member

Yeah, I definitely can see that this is useful. GitHub is kinda bad at diffing rebases... Not sure why, all other platforms (gitlab, graphite, ...) seem to have figured it out 🤷

Let's merge this then and see if someone complains.

@flip1995 flip1995 added this pull request to the merge queue Aug 23, 2025
Merged via the queue into rust-lang:master with commit 0744c88 Aug 23, 2025
11 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 23, 2025
@samueltardieu samueltardieu deleted the range-diff-feature branch August 23, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants