Refined-github: Order commits by commit date

Created on 2 May 2018  ·  8Comments  ·  Source: sindresorhus/refined-github

GitHub orders commits by author date instead of commit date:

https://help.github.com/articles/why-are-my-commits-in-the-wrong-order/
https://github.com/isaacs/github/issues/386#issuecomment-225763691 (title of this issue is sorta wrong)

I haven't looked at how hard it would be to fix this with refined-github. If I find a reasonable way to do it, would you accept a PR for it?

under discussion

Most helpful comment

If we were to reorder commits, I'll prefer ordering by parent in the Git graph and using dates only with multiple parents. This is a long-time issue I have with GitHub pull requests which I've created test reports for and communicated with GitHub. They are unwilling to change it. When you have a PR and interactively rebase your branch history and reorder commits they get reordered in some places on GitHub, but not in others. I don't see the benefit in switching the date, though. Committer date is better when ordering by date IMHO.

All 8 comments

I think it's rare and unimportant enough to justify making an API call for the current branch to get each commit's date.

I don't think I understand your comment. You mean it's rare and unimportant (😢 on the latter), so it's not worth making an API call all the time? What about as an optional feature that defaulted to "off"?

A much easier feature to add would be putting small numbers beside the commits to indicate their true order, if they're not in the right order already.

Sorting or numbering still requires an API call. “Off-by-default” features are better off as separate extensions

If we were to reorder commits, I'll prefer ordering by parent in the Git graph and using dates only with multiple parents. This is a long-time issue I have with GitHub pull requests which I've created test reports for and communicated with GitHub. They are unwilling to change it. When you have a PR and interactively rebase your branch history and reorder commits they get reordered in some places on GitHub, but not in others. I don't see the benefit in switching the date, though. Committer date is better when ordering by date IMHO.

Closing as per my first comment. Perhaps Mottie has a userscript for this

@graingert Is this about opening a new issue to discuss what I've suggested in https://github.com/sindresorhus/refined-github/issues/1294#issuecomment-386797552?

Was this page helpful?
0 / 5 - 0 ratings