{"thread":{"id":"38603","subject":"Strange reachability inconsistency (apparently, at least...)","startedAt":"2015-02-19T15:03:37Z","lastAt":"2015-02-23T06:44:31Z","messageCount":3,"participants":["ydirson@free.fr","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"256352","messageId":"324985759.551780546.1424358217833.JavaMail.root@zimbra39-e7.priv.proxad.net","threadId":"38603","inReplyTo":"144640746.551672305.1424355582540.JavaMail.root@zimbra39-e7.priv.proxad.net","subject":"Strange reachability inconsistency (apparently, at least...)","fromName":"","fromEmail":"ydirson@free.fr","sentAt":"2015-02-19T15:03:37Z","receivedAt":"2015-02-19T15:03:37Z","isPatch":false,"sender":{"key":"ydirson@free.fr","avatar":null},"body":"I have a (fsck-clean) git tree in which for 2 commits A and B:\n\n* \"git merge-base --is-ancestor A B\" returns 0\n* \"git log B..A\" returns a non-empty set of commits\n\nI get this behaviour with 2.3.0 as well as with 2.1.3 and 1.7.12.\n\nIs that a real bug or am I just misinterpreting something ?\n"},{"id":"256490","messageId":"CAPc5daW=OeNmPVMVWQvp3rfYzfV7z6c1=26E26y0SaRQH7JooA@mail.gmail.com","threadId":"38603","inReplyTo":"324985759.551780546.1424358217833.JavaMail.root@zimbra39-e7.priv.proxad.net","subject":"Re: Strange reachability inconsistency (apparently, at least...)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-02-22T23:30:11Z","receivedAt":"2015-02-22T23:30:11Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"On Thu, Feb 19, 2015 at 7:03 AM,  <ydirson@free.fr> wrote:\n> I have a (fsck-clean) git tree in which for 2 commits A and B:\n>\n> * \"git merge-base --is-ancestor A B\" returns 0\n> * \"git log B..A\" returns a non-empty set of commits\n>\n> I get this behaviour with 2.3.0 as well as with 2.1.3 and 1.7.12.\n>\n> Is that a real bug or am I just misinterpreting something ?\n\nSounds strange. Is it possible to share the repository (or an\nanonymised copy of it)?\n"},{"id":"256497","messageId":"xmqq1tlhunxs.fsf@gitster.dls.corp.google.com","threadId":"38603","inReplyTo":"CAPc5daW=OeNmPVMVWQvp3rfYzfV7z6c1=26E26y0SaRQH7JooA@mail.gmail.com","subject":"Re: Strange reachability inconsistency (apparently, at least...)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-02-23T06:44:31Z","receivedAt":"2015-02-23T06:44:31Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> On Thu, Feb 19, 2015 at 7:03 AM,  <ydirson@free.fr> wrote:\n>> I have a (fsck-clean) git tree in which for 2 commits A and B:\n>>\n>> * \"git merge-base --is-ancestor A B\" returns 0\n>> * \"git log B..A\" returns a non-empty set of commits\n>>\n>> I get this behaviour with 2.3.0 as well as with 2.1.3 and 1.7.12.\n>>\n>> Is that a real bug or am I just misinterpreting something ?\n>\n> Sounds strange. Is it possible to share the repository (or an\n> anonymised copy of it)?\n\nActually it does not sound all that strange.\n\nI suspect that B is indeed a proper descendant of A, but you have\ncommits with screwed-up committer timestamps between these two\ncommits that break the cut-off heuristic used by log and reb-list.\n\nGrab the output from \"git rev-list B..A\".  These are supposed to be\nahead of B (i.e. should not be reachable from B).  Then look at the\noutput from \"git log B\" (no lower bound) and see if these commits\nappear there, perhaps like:\n\n    $ git rev-list B..A | sed -e 's/^/^/' >phantoms\n    $ git log --format='%H %ct' B | grep -C2 -f phantoms\n\nHits from the latter \"grep\" would indicate that what the traversal\nB..A claimed that are not reachable from B contained some commits\nthat are indeed reachable from B.\n"}]}