{"action":"created","issue":{"url":"https://api.github.com/repos/libgit2/libgit2/issues/3492","labels_url":"https://api.github.com/repos/libgit2/libgit2/issues/3492/labels{/name}","comments_url":"https://api.github.com/repos/libgit2/libgit2/issues/3492/comments","events_url":"https://api.github.com/repos/libgit2/libgit2/issues/3492/events","html_url":"https://github.com/libgit2/libgit2/pull/3492","id":114246130,"number":3492,"title":"merge-base: Remove redundant merge bases","user":{"login":"vmg","id":42793,"avatar_url":"https://avatars.githubusercontent.com/u/42793?v=3","gravatar_id":"","url":"https://api.github.com/users/vmg","html_url":"https://github.com/vmg","followers_url":"https://api.github.com/users/vmg/followers","following_url":"https://api.github.com/users/vmg/following{/other_user}","gists_url":"https://api.github.com/users/vmg/gists{/gist_id}","starred_url":"https://api.github.com/users/vmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmg/subscriptions","organizations_url":"https://api.github.com/users/vmg/orgs","repos_url":"https://api.github.com/users/vmg/repos","events_url":"https://api.github.com/users/vmg/events{/privacy}","received_events_url":"https://api.github.com/users/vmg/received_events","type":"User","site_admin":true},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-30T10:49:44Z","updated_at":"2015-10-30T13:16:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/libgit2/libgit2/pulls/3492","html_url":"https://github.com/libgit2/libgit2/pull/3492","diff_url":"https://github.com/libgit2/libgit2/pull/3492.diff","patch_url":"https://github.com/libgit2/libgit2/pull/3492.patch"},"body":"Following up on the Famous Case Of The Extra Merge Base. Comparing our runtime vs Git's, it turns out we never implemented a second optimization pass after finding the merge bases:\r\n\r\nhttps://github.com/git/git/blob/80980a1d5c2678ab9031d7c60faf38b9631eb1ce/commit.c#L900-L954\r\n\r\n> Some commit in the array may be an ancestor another commit.  Move such commit to the end the array, and return the number of commits are independent from each other. \r\n\r\nSo, here's my implementation, ported mostly verbatim from Git. I'm aware tests are missing, but it's not immediately obvious to me how to reproduce the \"minimal test case\" here (I haven't put much thought into it to be fair). Any assistance on that would be welcome.\r\n\r\ncc @carlosmn @ethomson @peff "},"comment":{"url":"https://api.github.com/repos/libgit2/libgit2/issues/comments/152520600","html_url":"https://github.com/libgit2/libgit2/pull/3492#issuecomment-152520600","issue_url":"https://api.github.com/repos/libgit2/libgit2/issues/3492","id":152520600,"user":{"login":"vmg","id":42793,"avatar_url":"https://avatars.githubusercontent.com/u/42793?v=3","gravatar_id":"","url":"https://api.github.com/users/vmg","html_url":"https://github.com/vmg","followers_url":"https://api.github.com/users/vmg/followers","following_url":"https://api.github.com/users/vmg/following{/other_user}","gists_url":"https://api.github.com/users/vmg/gists{/gist_id}","starred_url":"https://api.github.com/users/vmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmg/subscriptions","organizations_url":"https://api.github.com/users/vmg/orgs","repos_url":"https://api.github.com/users/vmg/repos","events_url":"https://api.github.com/users/vmg/events{/privacy}","received_events_url":"https://api.github.com/users/vmg/received_events","type":"User","site_admin":true},"created_at":"2015-10-30T13:16:52Z","updated_at":"2015-10-30T13:16:52Z","body":"Waiting for some feedback from @peff too."}}