Skip to content

Add commit message diff in our range-diff implementation#2422

Merged
Kobzol merged 3 commits into
rust-lang:masterfrom
Urgau:gh-range-diff-commits
Jun 1, 2026
Merged

Add commit message diff in our range-diff implementation#2422
Kobzol merged 3 commits into
rust-lang:masterfrom
Urgau:gh-range-diff-commits

Conversation

@Urgau
Copy link
Copy Markdown
Member

@Urgau Urgau commented May 31, 2026

It has been mentioned to me by multiple people that they would like to see the different commit messages in our range-diff, like is done in the official git range-diff.

This PR therefore adds such feature. It's not exactly the same, as we show the changes across the full range, and not per commit as is done by git range-diff.

As such I added a new section called "Commits" which list all the commits and the diff if there is a change in the message.

New commits Changed message
image image

Testing links:

Best reviewed commit by commit.

cc @camelid

@Urgau Urgau requested a review from Kobzol May 31, 2026 18:58
@Urgau Urgau force-pushed the gh-range-diff-commits branch from 951ec46 to 0618555 Compare May 31, 2026 20:00
Comment thread src/github/repos.rs Outdated
#[derive(Debug, serde::Deserialize)]
pub struct GitUser {
pub date: DateTime<FixedOffset>,
pub name: String,
Copy link
Copy Markdown
Member

@Kobzol Kobzol May 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that at least the e-mail can be missing (https://docs.rs/octocrab/latest/octocrab/models/struct.SimpleUser.html#structfield.name). I definitely ran into this in bors. I'd perhaps make both an Option, but definitely the e-mail should be an Option.

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tbh, I'm not even sure having the author and email is that useful.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I made both optional.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the message is the most important thing in the diff, yeah.

@Urgau Urgau force-pushed the gh-range-diff-commits branch from 0618555 to 5188615 Compare June 1, 2026 06:41
Copy link
Copy Markdown
Member

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Really cool feature.

View changes since this review

@Kobzol Kobzol added this pull request to the merge queue Jun 1, 2026
Merged via the queue into rust-lang:master with commit c3ec622 Jun 1, 2026
3 checks passed
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.

2 participants