{"action":"closed","issue":{"url":"https://api.github.com/repos/cha55son/stash-commit-graph-plugin/issues/39","labels_url":"https://api.github.com/repos/cha55son/stash-commit-graph-plugin/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/cha55son/stash-commit-graph-plugin/issues/39/comments","events_url":"https://api.github.com/repos/cha55son/stash-commit-graph-plugin/issues/39/events","html_url":"https://github.com/cha55son/stash-commit-graph-plugin/issues/39","id":38227759,"number":39,"title":"Incorrect commit order displayed when two commits on the same branch have the same timestamp","user":{"login":"bbaetz","id":304030,"avatar_url":"https://avatars.githubusercontent.com/u/304030?v=3","gravatar_id":"","url":"https://api.github.com/users/bbaetz","html_url":"https://github.com/bbaetz","followers_url":"https://api.github.com/users/bbaetz/followers","following_url":"https://api.github.com/users/bbaetz/following{/other_user}","gists_url":"https://api.github.com/users/bbaetz/gists{/gist_id}","starred_url":"https://api.github.com/users/bbaetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbaetz/subscriptions","organizations_url":"https://api.github.com/users/bbaetz/orgs","repos_url":"https://api.github.com/users/bbaetz/repos","events_url":"https://api.github.com/users/bbaetz/events{/privacy}","received_events_url":"https://api.github.com/users/bbaetz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cha55son/stash-commit-graph-plugin/milestones/5","labels_url":"https://api.github.com/repos/cha55son/stash-commit-graph-plugin/milestones/5/labels","id":970039,"number":5,"title":"v3.0","description":"Complete rewrite. Main concerns listed below.\r\n\r\n* Correct History\r\n* Performance\r\n* Visual cleanup remove complexity.","creator":{"login":"cha55son","id":879295,"avatar_url":"https://avatars.githubusercontent.com/u/879295?v=3","gravatar_id":"","url":"https://api.github.com/users/cha55son","html_url":"https://github.com/cha55son","followers_url":"https://api.github.com/users/cha55son/followers","following_url":"https://api.github.com/users/cha55son/following{/other_user}","gists_url":"https://api.github.com/users/cha55son/gists{/gist_id}","starred_url":"https://api.github.com/users/cha55son/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cha55son/subscriptions","organizations_url":"https://api.github.com/users/cha55son/orgs","repos_url":"https://api.github.com/users/cha55son/repos","events_url":"https://api.github.com/users/cha55son/events{/privacy}","received_events_url":"https://api.github.com/users/cha55son/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":4,"state":"open","created_at":"2015-02-07T19:18:00Z","updated_at":"2015-02-08T00:02:41Z","due_on":"2015-02-08T06:00:00Z","closed_at":null},"comments":3,"created_at":"2014-07-19T06:35:32Z","updated_at":"2015-02-08T00:02:41Z","closed_at":"2015-02-08T00:02:41Z","body":"When two commits on the same branch have the same timestamp, the graph is wrong. (This is different to issue 24, because the REST API is returning the correct response)\r\n\r\nTo reproduce, create a new, empty repo, then run:\r\n\r\n```\r\necho 1 > file; git add file; GIT_AUTHOR_DATE='2014-01-01 01:00:00' GIT_COMMITTER_DATE='2014-01-01 01:00:00' git commit -m '1' file\r\necho 2 > file; git add file; GIT_AUTHOR_DATE='2014-01-01 02:00:00' GIT_COMMITTER_DATE='2014-01-01 02:00:00' git commit -m '2' file\r\ngit checkout -b branch1\r\necho '2a' > file; git add file; GIT_AUTHOR_DATE='2014-01-01 02:10:00' GIT_COMMITTER_DATE='2014-01-01 02:10:00' git commit -m '2a' file\r\necho '2b' > file; git add file; GIT_AUTHOR_DATE='2014-01-01 02:20:00' GIT_COMMITTER_DATE='2014-01-01 02:20:00' git commit -m '2b' file\r\necho '2b same' > file; git add file; GIT_AUTHOR_DATE='2014-01-01 02:20:00' GIT_COMMITTER_DATE='2014-01-01 02:20:00' git commit -m '2b same' file\r\ngit checkout master\r\ngit checkout -b branch2\r\necho \"3a\" > file; git commit -m '3a' file\r\ngit push --mirror\r\n```\r\n\r\ngit-rev list has the branch1 commits in the right order:\r\n\r\n```\r\n$ git rev-list --oneline branch1\r\n989ae6e 2b same\r\nc2490de 2b\r\nf78a891 2a\r\n0c48bf8 2\r\nfcc1829 1\r\n```\r\n\r\nas does the REST API - /rest/api/1.0/projects/PROJECT_1/repos/test2/commits?until=refs%2Fheads%2Fbranch1&limit=300 gives:\r\n\r\n```\r\n{\"values\":[{\"id\":\"989ae6e73ac6e616a78b24b37c3e17e36c5c13a7\",\"displayId\":\"989ae6e\",\"author\":{\"name\":\"Bradley Baetz\",\"emailAddress\":\"bbaetz@gmail.com\"},\"authorTimestamp\":1388503200000,\"message\":\"2b same\",\"parents\":[{\"id\":\"c2490de257167c1095b143499e15385908dbbf93\",\"displayId\":\"c2490de\"}]},{\"id\":\"c2490de257167c1095b143499e15385908dbbf93\",\"displayId\":\"c2490de\",\"author\":{\"name\":\"Bradley Baetz\",\"emailAddress\":\"bbaetz@gmail.com\"},\"authorTimestamp\":1388503200000,\"message\":\"2b\",\"parents\":[{\"id\":\"f78a89108b81f287d20b390fb24bc3d056ec8828\",\"displayId\":\"f78a891\"}]},{\"id\":\"f78a89108b81f287d20b390fb24bc3d056ec8828\",\"displayId\":\"f78a891\",\"author\":{\"name\":\"Bradley Baetz\",\"emailAddress\":\"bbaetz@gmail.com\"},\"authorTimestamp\":1388502600000,\"message\":\"2a\",\"parents\":[{\"id\":\"0c48bf89f34dacd20940aa7bd926d402d8165381\",\"displayId\":\"0c48bf8\"}]},{\"id\":\"0c48bf89f34dacd20940aa7bd926d402d8165381\",\"displayId\":\"0c48bf8\",\"author\":{\"name\":\"Bradley Baetz\",\"emailAddress\":\"bbaetz@gmail.com\"},\"authorTimestamp\":1388502000000,\"message\":\"2\",\"parents\":[{\"id\":\"fcc1829eb4b53567c533115063635f577e1b9502\",\"displayId\":\"fcc1829\"}]},{\"id\":\"fcc1829eb4b53567c533115063635f577e1b9502\",\"displayId\":\"fcc1829\",\"author\":{\"name\":\"Bradley Baetz\",\"emailAddress\":\"bbaetz@gmail.com\"},\"authorTimestamp\":1388498400000,\"message\":\"1\",\"parents\":[]}],\"size\":5,\"isLastPage\":true,\"start\":0,\"limit\":300,\"nextPageStart\":null}\r\n```\r\n\r\nIts not just because the two timestamps are at the tip of the branch - further commits to branch1 give an even more odd look.\r\n\r\n(If I don't create branch2, then only master is shown in the graph - I think that that's issue #34 ?)\r\n\r\n![wronggraph](https://cloud.githubusercontent.com/assets/304030/3634013/bb9ec05a-0f0e-11e4-91ee-83f1d39d568c.png)\r\n"}}