Commits are listed in wrong order

For whatever reason, the commits in our repository are listed in wrong order, showing that our coverage has decreased, when it has in fact increased. You can see the wrong order in Codecov compared to Commits · dovecot/core · GitHub

Thanks @cmouse, I’ll forward this to the product team.

Hi @cmouse, apologies for the delay here. I think this is actually a difference in the way Codecov deals with commit order. There is the author date and the commit date. The author date is defined as when the actual git commit occurs, while the commit date can change due to rebases or the commit message is updated.

You can see that with the two commits 645a30a6c74bdfe3cb167382c275222cb9f7a5f5 and fea1bacab954d2f112da8a95756f198530e274af. The former is listed as earlier than the latter, however on GitHub, I believe the opposite is true.

Calling the GitHub API on both, we see this data:

{
    "sha": "645a30a6c74bdfe3cb167382c275222cb9f7a5f5",
    "commit": {
        "author": {
            "date": "2020-08-14T21:56:36Z"
        },
        "committer": {
            "date": "2020-09-23T11:33:34Z"
{
    "sha": "fea1bacab954d2f112da8a95756f198530e274af",
    "commit": {
        "author": {
            "date": "2020-08-16T09:57:36Z"
        },
        "committer": {
            "date": "2020-08-21T08:53:12Z"
        },

You’ll see that comparing by author date will match with what is happening on Codecov, and comparing based on commit date will flip the order.

1 Like